Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme demo no longer works? Unable to add relationship because child variable is also its index #37

Open
actuarial-lonewolf opened this issue May 2, 2021 · 1 comment

Comments

@actuarial-lonewolf
Copy link

Hi,

I'm trying to run the demo and it stops at add_relationship.

library(magrittr)
set_1 <- data.frame(key = 1:100, value = sample(letters, 100, TRUE), stringsAsFactors = TRUE)
set_2 <- data.frame(key = 1:100, value = sample(LETTERS, 100, TRUE), stringsAsFactors = TRUE)

as_entityset(set_1, index = "key", entity_id = "set_1", id = "demo") %>%
  add_entity(entity_id = "set_2", df = set_2, index = "key") %>%
  add_relationship(
    parent_set = "set_1",
    child_set = "set_2",
    parent_idx = "key",
    child_idx = "key"
  )

Error:

 Error in py_call_impl(callable, dots$args, dots$keywords) : 
  ValueError: Unable to add relationship because child variable 'key' in 'set_2' is also its index

I think it might be related to this new error message from this Jun 2020 issue, on featuretools.

I've played around the code but have a hard time understanding how to fix this.
Is there a quick fix?

Thanks for you help!

Diagnotic info:

SessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363) 
reticulate_1.19      featuretoolsR_0.4.4  magrittr_2.0.1
reticulate::py_discover_config() 
python:         C:/Anaconda3/envs/r-reticulate/python.exe
libpython:      C:/Anaconda3/envs/r-reticulate/python36.dll
pythonhome:     C:/Anaconda3/envs/r-reticulate
version:        3.6.13 (default, Feb 19 2021, 05:17:09) [MSC v.1916 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:/Anaconda3/envs/r-reticulate/Lib/site-packages/numpy
numpy_version:  1.19.5

python versions found: 
 C:/Anaconda3/envs/r-reticulate/python.exe
 C:/Anaconda3/python.exe
@praktiskt
Copy link
Owner

Hi there and I'm sorry you're having trouble using the library. I am no longer working much with R, so I'm unlikely to pursue this issue in the immediate future. I do know others have had issues running the library under Anaconda.

If you manage to find a solution, do share it here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants