I am attempting a run a netlogo from python using the pyNetLogo
library. However when I do I get the following error which I am unable to resolve.
Please note that the netlogo model works fine when running on its own (using netlogo itself instead of running it through python).
Also note that this particular model utilizes netlogo's python extension to call python from inside netlogo for 1 function. I have mentioned this as SETUP-MUNKRES is this function and perhaps thats what the error is about.
Any idea on how to resolve this issue?
import numpy as np
import pyNetLogo
import os
netlogo = pyNetLogo.NetLogoLink(gui = True)
netlogo.load_model("model/crtt_v2.nlogo")
# Setup
netlogo.command("setup")
netlogo.command("go")
Extension exception: Python process did not provide a port to connect with:
null
C:\Users\Imantha Gunasekera\anaconda3\python.exe: can't open file 'C:\Program Files\NetLogo 6.1.0\app\pyext.py': [Errno 2] No such file or directory
error while resc-agent-a 15019 running PY:SETUP
called by procedure SETUP-MUNKRES
called by procedure GO
called by procedure __EVALUATOR