NEURON cann't open hoc

Post Reply
liqiang
Posts: 4
Joined: Wed Sep 11, 2024 11:04 pm

NEURON cann't open hoc

Post by liqiang »

Hi, when I want to run a file, an error occurred:
0 C:\nrn\bin\nrniv.exe: can't open /cygdrive/C/Users/17558/Desktop/data driven model/passive_fit/init_iclamprawmodel.hoc
This error occurred suddenly; before this, I could run the file normally. In addition, when I use NRNGUI, clicking "Load HOC" and "Load Session" do not respond.
ted
Site Admin
Posts: 6358
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NEURON cann't open hoc

Post by ted »

First, let me thank you for using NEURON.

Now, about the problem you encountered, I need to ask a few questions.

What version of Windows are you using? 10 or 11 or something else?
Have you updated Windows recently?

Have you updated NEURON recently?

What version of NEURON are you using? (in a Command Prompt window execute nrniv from the command line and tell me the first line that NEURON prints to the terminal)

Which of these are you doing to launch your program?
--double clicking on init_iclamprawmodel.hoc in a Windows file browser
--double clicking on the init_iclamprawmodel.hoc item in a folder on your desktop
--executing a command in a Command Prompt window
--executing a command in a bash terminal
If you're executing a command in a Command Prompt window or a bash terminal, what is the command?
when I use NRNGUI, clicking "Load HOC" and "Load Session" do not respond
How did you launch NRNGUI?
--double clicking on its icon in the NEURON folder on your desktop or in the Windows Start menu
--double clicking on it in a Windows file browser
--executing a command in a Command Prompt window
--executing a command in a bash terminal
If you're executing a command in a Command Prompt window or a bash terminal, what is the command?

Finally, a suggestion and one more question:

Open a Command Prompt window, and in that window execute this command
cd C:\Users\17558\Desktop\data driven model\passive_fit
then execute this command
nrniv init_iclamprawmodel.hoc
Did that succeed?
liqiang
Posts: 4
Joined: Wed Sep 11, 2024 11:04 pm

Re: NEURON cann't open hoc

Post by liqiang »

Thank you so much for your reply! I am using Windows 11 and have updated it and NEURON. Now the other problem has been resolved. But when I double-click on the init_iclamprawmodel.hoc item in a folder on my desktop, I still get an error:
C:\nrn\bin\nrniv.exe: can't open /cygdrive/C/Users/17558/Desktop/data driven model/passive_fit/init_iclamprawmodel.hoc
I followed your suggestion and was able to run the program.
ted
Site Admin
Posts: 6358
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: NEURON cann't open hoc

Post by ted »

Thanks for the followup. To help with further diagnosis:

What version of Windows are you using? 10 or 11 or something else?
Have you updated Windows recently?

Have you updated NEURON recently?

What version of NEURON are you using?
hines
Site Admin
Posts: 1706
Joined: Wed May 18, 2005 3:32 pm

Re: NEURON cann't open hoc

Post by hines »

Just to help isolate the problem...
Please remove the two spaces from the "data driven model" folder name and try again (you can replace with - or _). If your model involves mod files, you may also have to rerun mknrndll or nrnivmodl.

When you launch neuron, what banner is printed.

Our intention is for things to work when file and folder names contain spaces.
liqiang
Posts: 4
Joined: Wed Sep 11, 2024 11:04 pm

Re: NEURON cann't open hoc

Post by liqiang »

Thank you so much! After following your advice and renaming the file, I could double-click on it and run it.
Post Reply