pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.49k stars 524 forks source link

module 'graphviz.backend' has no attribute 'ENCODING' #560

Closed deebanesh41 closed 2 years ago

deebanesh41 commented 2 years ago

Hi,

When I try to run the example : from IPython.display import Image from sklearn.externals.six import StringIO from sklearn.tree import export_graphviz import pydotplus, graphviz

AttributeError: module 'graphviz.backend' has no attribute 'ENCODING'

I've tried the steps in the repo to generate basic state diagrams:

conda install graphviz python-graphviz pip install graphviz pygraphviz but no luck, anaconda.org has some similar documentation to try:

To install this package with conda run one of the following:

Download Graphviz from here (ZIP file) Unzip the file and copy-paste it in C:\Program Files (x86)\ Make sure your file is unzipped and placed in Program Files (x86) Environment Variable: Add C:\Program Files (x86)\graphviz-2.38\release\bin to the user path Environment Variable: Add C:\Program Files (x86)\graphviz-2.38\release\bin\dot.exe to the system path Install the Python Graphviz package - pip install graphviz Install pydotplus - pip install pydotplus

Where still no luck trying on Windows

Everything seems to install OK but no matter what I try when I run the examples IPython notebook files in locally I cant render anything.

Thanks for any tips.

aleneum commented 2 years ago

Hello @deebanesh41,

does this Stackoverflow post solves your issue?

https://stackoverflow.com/questions/69989691/how-to-resolve-attributeerror-module-graphviz-backend-has-no-attribute-encod

aleneum commented 2 years ago

closing this due to lack of feedback. Feel free to comment if this problem still occurs and can be traced to transitions. I will reopen the issue if needed.