Page 1 of 1

syntax error

Posted: Tue Mar 11, 2014 12:18 pm
by kahinou

I've juste started using Neuron and I'm modifiying an already existant model. I particularly struggle with a syntax erro because the error message says it is in line 1321; but this line just doesn't exist in my script. Generally, does this mean that the error isn't something the software can find?

Thank you in advance

Re: syntax error

Posted: Wed Mar 12, 2014 4:35 pm
by ted
Line numbers are not useful. The text of the error message is the clue to the location of the problem: when the interpreter encounters a syntax error, it prints the offending statement that it found in your source code, and complains about it.

So what was the error message?

Re: syntax error

Posted: Thu Mar 13, 2014 4:56 am
by kahinou
Thanks for your answer.

Here is the error message:

Code: Select all

nrniv: syntax error
 in runSpine01.hoc near line 1428
xopen("runSpine01.hoc"        )
NeuronSelect(      )

Re: syntax error

Posted: Thu Mar 13, 2014 10:10 am
by ted
That's an unusually cryptic syntax error message. I'd guess that the problem lies in NeuronSelect(), but I can't be more specific without seeing and trying your source code. If you want me to do that, zip up just enough code that I can use to reproduce the problem, and email it to
ted dot carnevale at yale dot edu

For guidelines about what to send, please see this
What to include in a zip file, and what to leave out

Re: syntax error

Posted: Thu Mar 13, 2014 11:45 am
by kahinou
The script is quite long and I don't know exactly which part of it leads to that problem.
It's probaly due to wrong setting of my formula: What I tried to do is to replace current injection to the soma by current injection to the spine head (in addition to the synaptic inputs to the head). By doing this, I just set everything that is related to the soma as comments. Thus, the problem is probably that the soma is created but no physiological neither electrical features are assigned to it.... I then have to find a way to treate the soma as an "observation compartment" rather than a stimulation one.

Re: syntax error

Posted: Fri Mar 14, 2014 11:10 am
by ted
kahinou wrote:The script is quite long and I don't know exactly which part of it leads to that problem.
Then zip it all up and send it.

Re: syntax error

Posted: Sun Mar 16, 2014 1:59 pm
by ted
The problem is with the "path" argument to a file chooser. The File class's file chooser method allows specification of 6 arguments, the last of which is the path to the directory that contains the file of interest. This argument must either be an empty string "" or a valid path that ends with a slash "/", e.g. "data/" or "../../data/". Otherwise you will think you are selecting a file called "data/X.txt" but NEURON will try to load "dataX.txt" (and complain if it doesn't find it).