Skip to content

EMBEDR cannot be loaded from main folder. #10

@ejohnson643

Description

@ejohnson643

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions