-
Notifications
You must be signed in to change notification settings - Fork 22
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
__includes["..."]extensions [gis] #13
Comments
Please provide an explanation of your question. This is not particularly clear. If your question is how to use extensions like the gis extension, the answer is quite simple. Copy all extensions you want to use to the same directory as your .nlogo file. (if I remember correctly, alternatively, copy them to the directory with your .py file. My guess is that it has to do with the search path used by netlogo and the current working directory of the ivm, but so far I have been unable to confirm this. |
ok, try the copying suggestion given above and let me know whether that solves it |
Thank you, Problem (1) is solved :) |
ok, great. Does copying the files you want to include to the directory with the logo file solve problem 2? |
Yes, Problem (2) was also solved by copying the files into the same directory as the .nlogo file. |
excellent. I will try to add this to the documentation soon. While in the longer term investigating whether changing the working directory of the iava virtual machine makes it not necessary to copy the extensions. |
1.) Within my NetLogo file I work with a "gis extension", defined at the beginning of the Code in the NetLogo file by
extensions [gis]
. When opening the NetLogo file manually and not through python everything works fine.However, when starting the NetLogo file through python using
netlogo.load_model(...)
the GUI of NetLogo opens, but an error message appears saying "Can't find extension: gis".2.) Within my NetLogo file I have separated the code and have outsourced certain procedures from the main code into a different file which I read in at the beginning of the NetLogo Code by using
__includes["file_name"]
. When opening the NetLogo file manually and not through python everything works fine and I can start e.g. the setup procedure from the NetLogo GUI.However, when trying to setup the NetLogo model through python using
netlogo.command('setup')
I receive the following error message in python: "NetLogoException: Nothing named SETUP has been defined."Thank you for helping me out :)
The text was updated successfully, but these errors were encountered: