Page 1 of 1

NEURON cann't open hoc

Posted: Wed Sep 25, 2024 11:10 pm
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.

Re: NEURON cann't open hoc

Posted: Thu Sep 26, 2024 12:57 pm
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?

Re: NEURON cann't open hoc

Posted: Thu Sep 26, 2024 9:53 pm
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.

Re: NEURON cann't open hoc

Posted: Thu Sep 26, 2024 11:20 pm
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?

Re: NEURON cann't open hoc

Posted: Fri Sep 27, 2024 7:36 am
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.

Re: NEURON cann't open hoc

Posted: Fri Sep 27, 2024 9:29 pm
by liqiang
Thank you so much! After following your advice and renaming the file, I could double-click on it and run it.