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

"NameError: 'syn' is not defined" occuring in examples 1, 2 and 3 #1

Open
NinaOmejc opened this issue Sep 13, 2024 · 3 comments
Open

Comments

@NinaOmejc
Copy link

NinaOmejc commented Sep 13, 2024

Hi, first thank you for the nice set of examples and exercises. I've run them on ebrains, where it works, but now I installed the LFPy and NEURON locally and I'm having issues while trying to run the same examples, from 1 to 3.

The error is in line with the synapse declaration:

synapse = LFPy.Synapse(...) 

Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm 2023.2.5\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
    coro = func()
  File "<input>", line 2, in <module>
  File "D:\Learning\lfpy\venv\lib\site-packages\LFPy\pointprocess.py", line 126, in __init__
    self.hocidx = int(cell.set_synapse(idx=idx, syntype=syntype,
  File "D:\Learning\lfpy\venv\lib\site-packages\LFPy\cell.py", line 586, in set_synapse
    self.synlist.append(syn)
NameError: name 'syn' is not defined. Did you mean: 'sys'?

Can you help me resolve the issue?
Thank you.

@espenhgn
Copy link

espenhgn commented Sep 13, 2024

Hi. How did you install LFPy locally?
The breaking code doesn't exist anymore in the more recent versions (i.e., LFPy-2.3.2).
Can you force a reinstall, i.e., with pip install --upgrade LFPy, and see if this fixes the issue?

Also, I should clarify, LFPy on Windows is on our end a fairly uncharted territory. It's mainly developed on Mac/Linux OS.

@NinaOmejc
Copy link
Author

Hi,
thank you for a quick reply!
Yeah, okay, then maybe it's because of Windows.

Otherwise, I have python3.10.11 and I installed the lfpy using pip, installed NEURON from binary and added its path to the environment. But it seems it installed lfpy version 2.1. When I tried to upgrade it, I got an error saying that the requirement neuron>=7.7 is not satisfied. However, when I import neuron and check the version, it says its the newest, 8.2.6+.

Any thoughts or should I just try with Linux?

@espenhgn
Copy link

Ok, this leaves some options:

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