Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENOENT (-4058) errors when running in VS Code #23

Open
hodgensc opened this issue Mar 15, 2024 · 1 comment
Open

ENOENT (-4058) errors when running in VS Code #23

hodgensc opened this issue Mar 15, 2024 · 1 comment

Comments

@hodgensc
Copy link

Hello! I'm having some trouble running the VS Code extension for BioNetGen.

I have Anaconda installed (v3.8.17), Strawberry Perl (v5.32.1), VS Code (v1.87.2), and the BNGL Extension (v.0.7.2). If I run "BNG setup" from within VS Code, it passes the checks for Perl, Python, and BNG.

When I attempt to run a BNGL file (I've been testing with https://github.com/RuleWorld/BNGTutorial/blob/master/ABC/ABC.bngl), I get the following output in the console:

bionetgen -req "0.5.0" run -i "c:\bngl_out\ABC\2024_03_15__18_41_42\ABC.bngl" -o "c:\bngl_out\ABC\2024_03_15__18_41_42" -l "c:\bngl_out\ABC\2024_03_15__18_41_42"
Error: spawn bionetgen ENOENT
process exited with code -4058

I can successfully run BNG if I start up an Anaconda environment and do it manually:

(base) C:\Users\hodgens\Documents\Lab\thermomodel\src>bionetgen run -i ABC.bngl
BioNetGen version 2.9.1
Reading from file C:\Users\hodgens\Documents\Lab\thermomodel\src\ABC.bngl (level 0)
Read 2 species.
Read 3 observable(s).
Read 1 reaction rule(s).
ACTION: simulate( method=>"cvode" )
ACTION: generate_network( ABC )
Iteration   0:     2 species      0 rxns  0.00e+00 CPU s
Iteration   1:     3 species      1 rxns  0.00e+00 CPU s
Iteration   2:     3 species      2 rxns  0.00e+00 CPU s
Cumulative CPU time for each rule
Rule   1:     2 reactions 0.00e+00 CPU s 0.00e+00 CPU s/rxn
Total   :     2 reactions 0.00e+00 CPU s 0.00e+00 CPU s/rxn
Wrote network in net format to ABC.net.
Network simulation using cvode
WARNING: writeFile(): Overwriting existing file ABC.net.
Wrote network in net format to ABC.net.
Running run_network on DESKTOP-LIA0VEB
full command: C:\Users\hodgens\anaconda3\lib\site-packages\bionetgen\bng-win\bin\run_network.exe -o ABC -p cvode -a 1e-08 -r 1e-08 --cdat 1 --fdat 0 -g ABC.net ABC.net 0.05 200
[simulation PID is: 21244]
run_network 3.0
Read 2 parameters from ABC.net
Read 3 species from ABC.net
Read 3 group(s) from ABC.net
Read 0 function(s) from ABC.net
Read 2 reaction(s) from ABC.net
2 reaction(s) have nonzero rate
Initialization took 0.01 CPU seconds
Propagating with cvode using dense LU
Time course of concentrations written to file ABC.cdat.
Time course of groups written to file ABC.gdat.
Propagation took 1.60e-02 CPU seconds
Program times:  0.03 CPU s 0.00 clock s
Updating species concentrations from ABC.cdat
CPU TIME: simulate 0.00 s.
Finished processing file C:\Users\hodgens\Documents\Lab\thermomodel\src\ABC.bngl.
CPU TIME: total 0.02 s.
@hodgensc
Copy link
Author

I did manage to get this working by the way. I think what was happening was that I'd started up VS Code in a way that didn't know how to talk to my Anaconda installation so that it could reach BioNetGen. When I start up VS Code through the Anaconda Navigator so that it knows about my Python environment, it works as expected.

I would appreciate if I could just start up VS Code normally without having to go through Anaconda, but at least I have a fix for now. It'll be something to look into on my end, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant