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

EMBEDR cannot be loaded from main folder. #10

Open
ejohnson643 opened this issue Dec 28, 2021 · 0 comments
Open

EMBEDR cannot be loaded from main folder. #10

ejohnson643 opened this issue Dec 28, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ejohnson643
Copy link
Owner

ejohnson643 commented Dec 28, 2021

Attempting to load EMBEDR after a clean install in the main directory of this repo:
from EMBEDR import EMBEDR
causes the following error:

Traceback (most recent call last): 
  File "<stdin>", line 1, in <module> 
  File "~/TestEMBEDRInstall/EMBEDR-master/EMBEDR/__init__.py", line 1, in <module>
    from EMBEDR.embedr import EMBEDR, EMBEDR_sweep
  File "~/TestEMBEDRInstall/EMBEDR-master/EMBEDR/embedr.py", line 9, in <module>
    from EMBEDR.tsne import tSNE_Embed
  File "~/TestEMBEDRInstall/EMBEDR-master/EMBEDR/tsne.py", line 32, in <module>
    from EMBEDR import _tsne
ImportError: cannot import name '_tsne' from partially initialized module 'EMBEDR' (most likely due to a circular import) (~/TestEMBEDRInstall/EMBEDR-master/EMBEDR/__init__.py)

This is because the folder and the module have the same name, so that when from EMBEDR import _tsne is called, it first looks in the folder named EMBEDR for the _tsne.py module, which doesn't exist. We should rename the source folder to a different name so that EMBEDR applies to the package/module and not to that folder.

@ejohnson643 ejohnson643 added the bug Something isn't working label Dec 28, 2021
@ejohnson643 ejohnson643 self-assigned this Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant