Closed amcomb closed 7 years ago
Hi @amcomb,
Have you tried with Python 2 ? the function unicode()
is only for Python 2, it was replaced by str()
in Python 3.
Cheers, Jaime
Oops, I did not run the Py3 tests for a long time, and now I did, I discovered several incompatibilities. But this one should be fixed in commit 193114bd86c1da9545ec5ab390858038278cffcf I pushed a minute ago. Tell me if its OK.
But I agree with @himito that using Py2 would be safer if you can. I still must rework the Py3 compatibility.
Cheers, Franck
I installed Py2.7 and it works now.
Thank you @himito and @fpom Amélie
Just one more question, have you a simple example of stochastic petri nets ?
Amélie
If you mean model stochastic nets, you can use plugin label
to record stochastic information. But there is no plugin to execute such nets, you'll have to do it yourself or export to another tool.
Thank you Do you know a tool to execute and solve stochastic petri nets ?
I'm not very well informed about stochastic nets tools, maybe you should start with https://www.informatik.uni-hamburg.de/TGI/PetriNets/tools/db.html
Hi, please, I'm using python 3.8 with Pycharm IDE 2020.1.1 , I'm trying to use snakes but I can't load plugins (snakes.plugins.load("gv", "snakes.nets", "nets") from nets import *) if I pass the mouse on the load the message (You need configured Python 2 SDK to render Epydoc docstrings) is displayed. I don't know if that is the problem or there is another problem I try to install epydoc but the problem is not resolved; please can someone help me?
SNAKES is not completely well ported to Python 3, does it work with Python 2.7?
@fpom , ok I will try python2.7 thank you
Hello
I'm trying to draw a simple petri net example extract from SNAKES; a flexible high-level petri nets library (tool paper) We use anaconda package with Spyder 3.1.2 and python 3.6. We've installed graphviz 2.38 and test it, it works.
error : runfile('C:/Users/ameli/Desktop/sanstitre0.py', wdir='C:/Users/ameli/Desktop') Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/ameli/Desktop/sanstitre0.py', wdir='C:/Users/ameli/Desktop')
File "C:\Users\ameli\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile execfile(filename, namespace)
File "C:\Users\ameli\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/ameli/Desktop/sanstitre0.py", line 19, in
pn.draw("hello.png")
File "C:\Users\ameli\Anaconda3\lib\site-packages\snakes\plugins\gv.py", line 239, in draw g.render(filename, engine, debug)
File "C:\Users\ameli\Anaconda3\lib\site-packages\snakes\plugins\gv.py", line 129, in render outfile.write(self.dot())
File "C:\Users\ameli\Anaconda3\lib\site-packages\snakes\plugins\gv.py", line 116, in dot self._dot(),
File "C:\Users\ameli\Anaconda3\lib\site-packages\snakes\plugins\gv.py", line 86, in _dot lines = ["subgraph %s {" % self, self._dot_attr(self.attr, "graph"),
File "C:\Users\ameli\Anaconda3\lib\site-packages\snakes\plugins\gv.py", line 82, in _dot_attr for key, val in attr.items()],
File "C:\Users\ameli\Anaconda3\lib\site-packages\snakes\plugins\gv.py", line 82, in
for key, val in attr.items()],
NameError: name 'unicode' is not defined
Any ideas to solve this error ?