Bug 1312815 - dot_parser does not work with recent pyparsing
Summary: dot_parser does not work with recent pyparsing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pydot
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-29 10:23 UTC by Tobias Neumann
Modified: 2016-05-12 20:55 UTC (History)
3 users (show)

Fixed In Version: pydot-1.0.28-11.fc24 pydot-1.0.28-11.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-07 12:09:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tobias Neumann 2016-02-29 10:23:33 UTC
Description of problem:
For python 2, the dot_parser of the pydot package does not work with the current version (pyparsing-2.1.0-2.fc23).
The package repo includes a fix for python 3 with also does not seem to work.

Version-Release number of selected component (if applicable):
pydot-1.0.28-7.fc23

How reproducible:
always

Steps to Reproduce:
1. use minimal example from here:
   http://stackoverflow.com/questions/15951748/pydot-and-graphviz-error-couldnt-import-dot-parser-loading-of-dot-files-will
   and save as test.py
2. execut as: python test.py

Actual results:
Couldn't import dot_parser, loading of dot files will not be possible.

Expected results:
The loaded graph

Additional info:
The upstream bug report is at https://github.com/erocarrera/pydot/issues/81 (upstream seems unresponsive, it would be good to fix this in the package for now).
The stackoverflow page also includes a workaround using pyparsing-1.5.7

I have built the package repo master which supposedly includes a fix (for python 3) (http://pkgs.fedoraproject.org/cgit/rpms/pydot.git/commit/?id=8edcd4a2e69a14f59f9bf888c7331ddc58f50217), but still got the same error.

So here is was tested with:
$ python3 test.py 

Validated that it actually uses Python 3 files like this:
$ strace -f -e trace=open python3 test.py 2>&1  | grep pydot
open("/usr/lib/python3.4/site-packages/__pycache__/pydot.cpython-34.pyc", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/python3.4/site-packages/pydot.py", O_RDONLY|O_CLOEXEC) = 6
open("/usr/lib/python3.4/site-packages/pydot.py", O_RDONLY|O_CLOEXEC) = 6
  File "/usr/lib/python3.4/site-packages/pydot.py", line 1810, in <lambda>
  File "/usr/lib/python3.4/site-packages/pydot.py", line 1896, in write

Comment 1 Jerry James 2016-04-15 15:35:22 UTC
Also, python-theano now checks for pydot 1.0.28 and refuses to use it due to this issue.  The Theano developers suggest either rolling back to pydot 1.0.25 or switching to https://github.com/pydot/pydot-ng.

Comment 2 Tom "spot" Callaway 2016-04-15 15:57:09 UTC
Debian has a fix for this:

https://anonscm.debian.org/cgit/python-modules/packages/pydot.git/plain/debian/patches/0002-support-python3.patch

I'll make updates that include their fix. I've tested against the test case in the original bug and confirmed that it works now with Python 2 and 3 and the latest pyparsing (2.1.0).

Comment 3 Fedora Update System 2016-04-15 16:21:07 UTC
pydot-1.0.28-11.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8bd73eda92

Comment 4 Fedora Update System 2016-04-15 16:21:14 UTC
pydot-1.0.28-11.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1f947de5f7

Comment 5 Fedora Update System 2016-04-15 23:21:18 UTC
pydot-1.0.28-11.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8bd73eda92

Comment 6 Fedora Update System 2016-04-22 20:58:18 UTC
pydot-1.0.28-11.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1f947de5f7

Comment 7 Fedora Update System 2016-05-07 12:09:00 UTC
pydot-1.0.28-11.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2016-05-12 20:55:33 UTC
pydot-1.0.28-11.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.