Bug Report: starting varibles with an i
Posted: Fri Jul 06, 2012 10:12 am
An error I have been having revealed something that dictates good style as well as something that needs to be fixed-- don't start your variables with an 'i' and 'e' or end with an 'i'
For example 'in = 0' as I just found in a file that is part of neuron this conflicts with the standard that for an ion named n the current will be called 'in' as in: USEION n READ en WRITE in --
So when seeing 'in' in that file -- neuron complained that there was no n_ion inserted -- which normally doesn't come up, but sometimes it does...
The mod file that uses the n ion is: http://senselab.med.yale.edu/ModelDB/Sh ... 5Cican.mod... The file that wants the n_ion is mview/distinctparm.hoc
- Method to recreate the error:
>>> from neuron import h
>>> a = h.Section()
Try to open modelview
- Error Message:
For example 'in = 0' as I just found in a file that is part of neuron this conflicts with the standard that for an ion named n the current will be called 'in' as in: USEION n READ en WRITE in --
So when seeing 'in' in that file -- neuron complained that there was no n_ion inserted -- which normally doesn't come up, but sometimes it does...
The mod file that uses the n ion is: http://senselab.med.yale.edu/ModelDB/Sh ... 5Cican.mod... The file that wants the n_ion is mview/distinctparm.hoc
- Method to recreate the error:
>>> from neuron import h
>>> a = h.Section()
Try to open modelview
- Error Message:
Code: Select all
n_ion mechanism not inserted in section PySec_0x1043c90
/usr/arch/nrn/x86_64/bin/nrniv:
in mview/distinctparm.hoc near line 8
in=0
^
xopen("mview/distinctparm.hoc")
xopen("mview.hoc")
execute1("{xopen("mview.hoc")}")
load_file("mview.hoc", "ModelView")
/usr/arch/nrn/x86_64/bin/nrniv: mview undefined function
in mview/distinctparm.hoc near line 8
{mview()}
^
mview()
execute("mview()")