Recently, I’ve been running into errors when I try accessing the dll using the Python wrapper VenPy (https://github.com/pbreach/venpy). When I try loading a model using venpy.load() I get a message: “This limited time copy has expired”. This is related to the Vensim license which did expire recently but when I renew and reinstall (using admin privileges) the problem persists. Apparently this is a common issue that may not be resolved yet according to the below forum topic.
viewtopic.php?t=6935
Here's the python error trace ending with self.dll.vensim_get_varnames() returning a negative number. Anybody have any thoughts? Help would be greatly appreciated.
Code: Select all
ValueError Traceback (most recent call last)
<ipython-input-2-33805c1d6dfa> in <module>()
----> 1 model=venpy.load("simple.vpm")
~\Documents\VenPy\venpy-master\venpy\venpy.py in load(model, dll)
29 VenPy model object
30 """
---> 31 return VenPy(model, dll)
32
33
~\Documents\VenPy\venpy-master\venpy\venpy.py in __init__(self, model, dll)
76 for num, var in types.items():
77 maxn = self.dll.vensim_get_varnames(b'*', num, None, 0)
---> 78 names = (ctypes.c_char * maxn)()
79 self.dll.vensim_get_varnames(b'*', num, names, maxn)
80 names = _c_char_to_list(names)
ValueError: Array length must be >= 0, not -6