Closed halbow closed 6 days ago
I'll start a release process for the #470 , I think this is also related.
Hi @halbow , I've released 2.3.5. Please let me know if this fixes the issue for you.
Best regards!
I don't have the second error anymore with 2.3.5 👍 But pydot is still missing when adding [diagrams]
It works when installing manually the deb package graphviz
and libgraphviz-dev
, then install python-statemachine[diagrams]
and I have to manually install pydot even when passing the diagrams optional dependency which is supposed to install it
Thanks @halbow , I got the issue!
I was declaring the pydot
dependence on the dev
group instead of an optional one: https://python-poetry.org/docs/pyproject#extras
BTW, I'm planning to switch from Poetry to UV.
Thanks again for reporting this!
Hi 👋
First of all, thanks for this library, I just started to use it and the interface seems really well designed 🚀
Description
When installing
statemachine
with the diagrams support, it doesn't seem install pydot. And when installing manually, there's still another error, maybe an incompatibility with a pydot version ?What I Did
I just run this on the latest python image using
docker run -it --rm python:latest bash
[EDIT] looks like the second error has been fixed by https://github.com/fgmacedo/python-statemachine/pull/470 but not released yet
If I install `graphviz` and `libgraphviz-dev` and `pydot`, I still have the following error: ```console root@ce911605e8d1:/# apt update Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB] [REDACTED] 67 packages can be upgraded. Run 'apt list --upgradable' to see them. root@ce911605e8d1:/# apt install graphviz libgraphviz-dev Reading package lists... Done [REDACTED] Processing triggers for fontconfig (2.14.1-4) ... root@ce911605e8d1:/# pip install pydot Collecting pydot Downloading pydot-3.0.1-py3-none-any.whl.metadata (9.9 kB) Collecting pyparsing>=3.0.9 (from pydot) Downloading pyparsing-3.1.4-py3-none-any.whl.metadata (5.1 kB) Downloading pydot-3.0.1-py3-none-any.whl (22 kB) Downloading pyparsing-3.1.4-py3-none-any.whl (104 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.1/104.1 kB 5.2 MB/s eta 0:00:00 Installing collected packages: pyparsing, pydot Successfully installed pydot-3.0.1 pyparsing-3.1.4 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv [notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: pip install --upgrade pip root@ce911605e8d1:/# pip install python-statemachine Collecting python-statemachine Downloading python_statemachine-2.3.4-py3-none-any.whl.metadata (13 kB) Downloading python_statemachine-2.3.4-py3-none-any.whl (41 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.3/41.3 kB 2.8 MB/s eta 0:00:00 Installing collected packages: python-statemachine Successfully installed python-statemachine-2.3.4 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv [notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: pip install --upgrade pip root@ce911605e8d1:/# python Python 3.12.3 (main, May 14 2024, 05:40:55) [GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from statemachine import State, StateMachine >>> >>> class ReproBug(StateMachine, strict_states=True): ... "A workflow machine" ... new = State("new", initial=True, value="new") ... finished = State("finished", final=True, value="finished") ... complete = new.to(finished) ... >>> repro_bug = ReproBug() >>> repro_bug._graph().write_png("res.png") "dot" with args ['-Tpng', '/tmp/tmpguib_k3o'] returned code: 1 stdout, stderr: b'' b"Warning: syntax ambiguity - badly delimited number '10p' in line 4 of /tmp/tmpguib_k3o splits into two tokens\nWarning: syntax ambiguity - badly delimited number '1p' in line 6 of /tmp/tmpguib_k3o splits into two tokens\nError: /tmp/tmpguib_k3o: syntax error in line 6 near ','\n" Traceback (most recent call last): File "