Neurodesign (Python)

I am trying to use neurodesign to populate my ITIs in python but am running into a circular dependency error upon neurodesign import.

Traceback (most recent call last):
Preformatted textFile "<frozen importlib._bootstrap>", line 991, in     _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\Afton\anaconda3\lib\site-packages\neurodesign\__init__.py", line 8, in <module>
    from neurodesign import design, experiment, optimisation
ImportError: cannot import name 'design' from partially initialized module 'neurodesign' (most likely due to a circular import) (C:\Users\Afton\anaconda3\lib\site-packages\neurodesign\__init__.py)

I read about circular dependency a bit and think it might be due to the package having the same name as one of the classes within the package.

Would anyone have any ideas on how to fix this issue?

In case others have this issue…

the __init__.py file should be empty because it calls the classes of neurodesign without having created the classes yet.

So, commenting out the import in the __init__ file worked for me!

Hi Afton,

Can you please clarify this further ? I have the same problem, I comment out the code at the “…\neurodesign_init_.py” file, but still the code does not run (i get the same error).

Thank you very much