Internal error: Not finished with previous input line...

Post Reply
GNeske
Posts: 1
Joined: Tue Aug 16, 2011 10:07 am

Internal error: Not finished with previous input line...

Post by GNeske » Tue Aug 16, 2011 10:16 am

I am completely new to NEURON, so I am following the examples in The NEURON Book (Cambridge Univ. Press). I have installed NEURON 7.1 on my Mac (running OS 10.6.7), and, as instructed in the book, have tried to drag example.hoc (which I created in Word and saved as a Unicode text file with the .hoc extension) to nrngui. When I do this, however, I receive the following message in Terminal:

Code: Select all

-e 
NEURON -- Release 7.1 (359:7f113b76a94b) 7f113b76a94b
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html

/Applications/NEURON-7.1/nrn/umac/bin/nrniv.app/Contents/MacOS/nrniv: Internal error: Not finished with previous input line
 near line 0
character \377 at position 0 is not printable
 ??/ ^
oc>
I also get a similar error message when I try the same thing with other .hoc files. I don't know what the problem here is. Any help would be appreciated. Thanks.

ted
Site Admin
Posts: 5260
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Internal error: Not finished with previous input line...

Post by ted » Tue Aug 16, 2011 1:00 pm

GNeske wrote:saved as a Unicode text file
There's the problem. Use ASCII, not Unicode.
which I created in Word
There's another problem, just waiting to happen. If you're going to do much programming, get a plain text editor. You'll find some suggestions in a thread in this forum entitled
Program editors for OS X

didu_20
Posts: 12
Joined: Wed Jun 19, 2013 9:05 am

Re: Internal error: Not finished with previous input line...

Post by didu_20 » Wed Jun 26, 2013 1:55 am

i am also a new member of forum and new to neuron facing a similar problem .all i do is write the code and save it as a .hoc file( by selecting save as and saving it as "koadn.hoc' ) in text pad as plain text and opened it with neuron.It shows the error that
in /cygdrive/C/downloads/Document1.hoc near line 1
character \223 at position 10 is not printable
load_file(“nrngui.hoc”)
^
oc>
in /cygdrive/C/downloads/Document1.hoc near line 1
character \223 at position 10 is not printable
load_file(“nrngui.hoc”)
^
this my code:
load_file(“nrngui.hoc”)

create soma, axon, dend[3]
access soma
soma L= 30
soma diam= 30
soma nseg= 1
soma insert hh
soma Ra= 100
soma cm= 1
}
create axon {\
axon L= 1000
axon diam= 1
axon nseg= 20
axon insert hh
}
For i= 0,2 dend {
nseg= 5
L= 200
diam(0:1)= 10:3
insert pas
g_pas= 0.05
e_pas= -65 }
connect axon(0),soma(0)
connect dend(0),soma(1)
dt= 0.05
tstop=5
v_init= -65
objref stim
soma stim= new ICLamp(0.5)
stim.del= 1
stim.dur= 0.1
stim.amp= 60
objectvar g
g= new graph()
g.size(0,5,80,40)
g.addvar(“soma.v(0.5)”)
g.view(0,-10,tstop,15,200,300.48)
proc initialize() {
t= 0
fintialize(v_init)
fcurrent }
proc integrate()
g.begin()
while( t<tstop)
fadvance()
g.plot(t) }
g.flush()
}
proc go()
initialize()
integrate() }
celldef()
nrnmainmenu()
nrncontrolmenu()
kindly tell if i am lacking in my concepts
Last edited by didu_20 on Thu Jun 27, 2013 2:54 pm, edited 1 time in total.

ted
Site Admin
Posts: 5260
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Internal error: Not finished with previous input line...

Post by ted » Wed Jun 26, 2013 12:28 pm

The problem is with the file generated by TextPad. I don't use it so I can't tell you how to avoid embedding non-printable characters in your file. If you can't find your answer in your program's documentation or on the vendor's web site, suggest you try a different editor.

didu_20
Posts: 12
Joined: Wed Jun 19, 2013 9:05 am

Re: Internal error: Not finished with previous input line...

Post by didu_20 » Thu Jun 27, 2013 6:04 am

kindly suggest which one i should use.can you please tell me how to run that model of extracellular stimulation and recording.

didu_20
Posts: 12
Joined: Wed Jun 19, 2013 9:05 am

ICLamp not a template

Post by didu_20 » Thu Jun 27, 2013 9:42 am

i used it with notepad and context editor but now when i run my code in neuron it shows this error

nrniv: alphasynapse is not a template
in /cygdrive/F/iit kgp project/l2.hoc near line 35
soma syn = new alphasynapse(0.5)
^
oc>
same thing happens with ICLamp and while adding graph too..
this is my code:
load_file(“nrngui.hoc”)
proc celdef()
create soma, axon, dend[3]
access soma
soma L= 30
soma diam= 30
soma nseg= 1
soma insert hh
soma Ra= 100
soma cm= 1
}
create axon {
axon L= 1000
axon diam= 1
axon nseg= 20
axon insert hh
}
For i= 0,2 dend {
nseg= 5
L= 200
diam(0:1)= 10:3
insert pas
g_pas= 0.05
e_pas= -65 }
connect axon(0),soma(0)
connect dend(0),soma(1)
dt= 0.05
tstop=5
v_init= -65

objref stim
soma stim= new Iclamp(0.5)
stim.del= 1
stim.dur= 0.1
stim.amp= 60
objref g
g= newgraph()
g.size(0,5,80,40)
g.addvar(“soma.v(0.5)”)
g.view(0,-10,tstop,15,200,300.48)
proc initialize() {
t= 0
fintialize(v_init)
fcurrent }
proc integrate()
g.begin()
while( t<tstop)
fadvance()
g.plot(t) }
g.flush()
}
proc go()
initialize()
integrate() }
nrnmainmenu()
nrncontrolmenu()
celldef()
kindly help me!!!

ted
Site Admin
Posts: 5260
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: ICLamp not a template

Post by ted » Thu Jun 27, 2013 12:09 pm

didu_20 wrote:i used it with notepad and context editor but now when i run my code in neuron it shows this error

nrniv: alphasynapse is not a template
Case is important. alphasynapse is not AlphaSynapse.

didu_20
Posts: 12
Joined: Wed Jun 19, 2013 9:05 am

Re: Internal error: Not finished with previous input line...

Post by didu_20 » Thu Jun 27, 2013 3:15 pm

ok now there is no error but it is not showing any graph.and i added soma.v(0.5) to the list of things to be plotted by addvar but when i open the point process manager there is no point process selected.I have to select it to AlphaSynapse .is it ok???? when it run it on neuron it shows a run control and neuron main panel window. But i think the graph should appear on the screen by itself.and also the point process manager.
am i still doing anything wrong??

ted
Site Admin
Posts: 5260
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Internal error: Not finished with previous input line...

Post by ted » Fri Jun 28, 2013 2:00 pm

didu_20 wrote:ok now there is no error but it is not showing any graph.
Did your code make NEURON generate any error messages? Examine what hoc prints to the terminal.

didu_20
Posts: 12
Joined: Wed Jun 19, 2013 9:05 am

Re: Internal error: Not finished with previous input line...

Post by didu_20 » Sat Jun 29, 2013 11:16 am

[/quote] Examine what hoc prints to the terminal.[/quote] what did you mean by that?? it shows this when i code -
sory for my late reply
NEURON -- Release 7.3 (849:5be3d097b917) 2013-04-11
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2013
See http://www.neuron.yale.edu/neuron/credits

1
0
1
1
oc>
and one very important favour i am a trainee and i have to simulate extracellular stimuation by an electrode in retinal gnglion cells.please please help me and give me some links .programs or material and stuff.
what all concepts should i know to do that??
i have read the neuron book twice and even gone through your extracellular stimulation and recording zip file but i cnt figure out some things-
1) in the file calcrxc.hoc from this equation - for (x,0) {
r = sqrt((x_xtra(x) - xe)^2 + (y_xtra(x) - ye)^2 + (z_xtra(x) - ze)^2)
what is rx and r ?? are they different?
2) in interpxyz i have not understood how to coordinates of nodes have been calculated from this part - // initialize the destination "independent" vector

Code: Select all

range = new Vector(nseg+2)
		range.indgen(1/nseg)
		range.sub(1/(2*nseg))
		range.x[0]=0
		range.x[nseg+1]=1
and this too -

yint.interpolate(range, length, yy)
zint.interpolate(range, length, zz)
i read about these functions but cnt interpret how they are working here.
3) i read about vector.play but i cnt understand this - vsrc.play(point_process_object, &var, ...) because of that i cnt understand this function in stim.hoc - stim_amp.play(&is_xtra, stim_time, 1)
4) THE BIGGEST PROBLEM IS i read from readme that to run it first complie the xtra file then run initstim and initrec. But when i complie xtra.mod file i shows this ERROR
gcc -DDLL_EXPORT -DPIC -I/src/scopmath -I/src/nrnoc -I/src/oc -I/lib -I/gccinc -I/gcc3inc -L/gcclib -c mod_func.c
mod_func.c: In function ‘modl_reg’:
mod_func.c:16:1: error: ‘_’ undeclared (first use in this function)
mod_func.c:16:1: note: each undeclared identifier is reported only once for each function it appears in
mod_func.c:16:2: error: expected ‘;’ before ‘~’ token
/lib/mknrndll.mak:65: recipe for target `mod_func.o' failed
make: *** [mod_func.o] Error 1

There was an error in the process of creating nrnmech.dll
Press Return key to exit

And on running initxstim it shows this
1
nrniv: xtra is not a Mechanism or Point Process
in cell.ses near line 397
}
^
CellMembrane[0].MechanismStandard("xtra" )
xopen("cell.ses" )
execute1("{xopen("cell.ses")}" )
load_file("cell.ses" )
0
nrniv: syntax error
in cell.ses near line 405
bild.subsets.snlist.object(1).ml.append(tobj)
^
oc>
i know its a lot to ask but please anybody (even the users ) please respond me regarding this asap a i have very less time to make this.Any help is greatly appreciated
Last edited by didu_20 on Sat Jun 29, 2013 5:06 pm, edited 1 time in total.

ted
Site Admin
Posts: 5260
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Internal error: Not finished with previous input line...

Post by ted » Sun Jun 30, 2013 5:30 pm

In order to help, I'll have to understand what you're trying to do and see the code that you are using. Please zip up just the source code (hoc, mod, and possibly ses files; no dlls, no .o and no .c files) and email it to me
ted dot carnevale at yale dot edu
along with a short description of the conceptual model that you are trying to implement.

Post Reply