Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import error #222

Closed
niannianQAQ opened this issue Apr 21, 2024 · 1 comment
Closed

import error #222

niannianQAQ opened this issue Apr 21, 2024 · 1 comment

Comments

@niannianQAQ
Copy link

Hi everyone,

I've installed graphviz0.18 in Pycharm and graphviz-install-2.50.0-win64 in my computer, and the pm4py version is 2.2.3 and the python version is 3.9.
I receive this message error:

Traceback (most recent call last):
  File "D:\chatbot-process-mining\chatbot_evaluation.py", line 6, in <module>
    import pm4py
  File "D:\chatbot-process-mining\venv\lib\site-packages\pm4py\__init__.py", line 20, in <module>
    from pm4py import util, objects, statistics, algo, visualization
  File "D:\chatbot-process-mining\venv\lib\site-packages\pm4py\visualization\__init__.py", line 21, in <module>
    from pm4py.visualization import common, dfg, petrinet, process_tree, transition_system, decisiontree, align_table, \
  File "D:\chatbot-process-mining\venv\lib\site-packages\pm4py\visualization\common\__init__.py", line 17, in <module>
    from pm4py.visualization.common import save, utils, gview, visualizer
  File "D:\chatbot-process-mining\venv\lib\site-packages\pm4py\visualization\common\gview.py", line 21, in <module>
    from graphviz.dot import Digraph
ImportError: cannot import name 'Digraph' from 'graphviz.dot' (D:\chatbot-process-mining\venv\lib\site-packages\graphviz\dot.py)

gview.py line 21:

19 from pm4py.util import vis_utils, constants
20 from io import BytesIO
21 from graphviz.dot import Digraph
@xflr6
Copy link
Owner

xflr6 commented Apr 21, 2024

import pm4py

IIUC you are trying to report an error in https://pypi.org/project/pm4py (not in this package, graphviz, which seems to be used as a dependency by pm4py).

You are probably looking for https://github.com/pm4py/pm4py-core/issues (e.g. pm4py/pm4py-core#282 seems to describe the same issue).

From a quick look you seem to be using an older version of that package, that had a bug relying on non-public API in graphviz. Seems to have been fixed in pm4py/pm4py-core@01d3dc4.

Hope that helps, closing.

@xflr6 xflr6 closed this as completed Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants