Syntax Warning

Post Reply
ryang
Posts: 17
Joined: Wed Mar 21, 2018 6:34 pm

Syntax Warning

Post by ryang »

I'm getting a syntax warning whenever I run my code, but I have no idea where it could be coming from. The warning is:

Code: Select all

<stdin>:114: SyntaxWarning: "is not" with a literal. Did you mean "!="?
Here is example output from hoc code that builds a simplified stellate cell as a template object (the mod files aren't all necessarily being used):

Code: Select all

NEURON -- VERSION 7.7.2 7.7 (2b7985ba) 2019-06-20
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2018
See http://neuron.yale.edu/neuron/credits

loading membrane mechanisms from /Users/name/Documents/Neuron/Neural Correlator/Run Models/Build & Test Simple Stellate/x86_64/.libs/libnrnmech.so
Additional mechanisms from files
 Exp2SynAMPA.mod Exp2SynNMDA_ref.mod Exp2SynNMDA_tar.mod Exp2SynNMDA_test.mod Gfluct.mod IKM.mod Nap.mod ampa.mod gclamp.mod hcn.mod kap.mod kdr.mod na8st.mod nmdanet_drv.mod nmdanet_mod.mod presynSTD.mod presynSTD_ref.mod presynSTD_tar.mod spines.mod vecevent.mod
<stdin>:114: SyntaxWarning: "is not" with a literal. Did you mean "!="?

oc>
So this output happens when I run my code in app called coderunner or sublime text 3 for osx; in case of sublime text 3 it seem to recognize the spine mod file and fails to run. When I run from the command line I don't get the error at all and everything works fine. Are there some kind of flags I'm not using in the command line that the applications are using?

Any help understanding where this syntax warning could be coming from would be appreciated.
ramcdougal
Posts: 214
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Public Health

Re: Syntax Warning

Post by ramcdougal »

This is harmless. You can ignore it.

Even though you're not using Python explicitly, NEURON will connect to Python to have it available (and Python is needed to enable certain functions). What happened was there was something in the NEURON internals that did not raise a Python warning until a change to Python in Python 3.8 (I think).

The development version of NEURON contains the fix.
Post Reply