Hello,
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
syntax error
-
- Site Admin
- Posts: 6303
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: syntax error
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?
So what was the error message?
Re: syntax error
Thanks for your answer.
Here is the error message:
Here is the error message:
Code: Select all
nrniv: syntax error
in runSpine01.hoc near line 1428
^
xopen("runSpine01.hoc" )
NeuronSelect( )
-
- Site Admin
- Posts: 6303
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: syntax error
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
viewtopic.php?f=28&t=560
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
viewtopic.php?f=28&t=560
Re: syntax error
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.
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.
-
- Site Admin
- Posts: 6303
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: syntax error
Then zip it all up and send it.kahinou wrote:The script is quite long and I don't know exactly which part of it leads to that problem.
-
- Site Admin
- Posts: 6303
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: syntax error
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).