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

dependency pydot doesn't work on Saucy #42

Closed
tfoote opened this issue May 20, 2014 · 1 comment
Closed

dependency pydot doesn't work on Saucy #42

tfoote opened this issue May 20, 2014 · 1 comment
Labels

Comments

@tfoote
Copy link

tfoote commented May 20, 2014

Unfortunately pydot doesn't work on Saucy.

Ticketed here upstream: https://code.google.com/p/pydot/issues/detail?id=81

Manually applying the patch from that ticket works.

Description: Support pyparsing v2
Author: grizzly.nyo@gmail.com
Origin: upstream
Bug: https://code.google.com/p/pydot/issues/detail?id=81#c9
Last-Update: 2014-03-10

---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/dot_parser.py
+++ b/dot_parser.py
@@ -25,8 +25,9 @@ from pyparsing import __version__ as pyp
 from pyparsing import ( nestedExpr, Literal, CaselessLiteral, Word, Upcase, OneOrMore, ZeroOrMore,
     Forward, NotAny, delimitedList, oneOf, Group, Optional, Combine, alphas, nums,
     restOfLine, cStyleComment, nums, alphanums, printables, empty, quotedString,
-    ParseException, ParseResults, CharsNotIn, _noncomma, dblQuotedString, QuotedString, ParserElement )
+    ParseException, ParseResults, CharsNotIn, dblQuotedString, QuotedString, ParserElement )

+_noncomma = "".join( [ c for c in printables if c != "," ] )

 class P_AttrList:

I'm mostly putting this here so others can know the problem and workaround. I've ticketed it upstream at: https://bugs.launchpad.net/ubuntu/+source/pydot/+bug/1321135

The error will manifest itself like this:

Couldn't import dot_parser, loading of dot files will not be possible.
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rqt_dep/ros_pack_graph.py", line 270, in _update_thread_run
    self._update_graph(self._generate_dotcode())
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rqt_dep/ros_pack_graph.py", line 309, in _update_graph
    self._nodes, self._edges = self.dot_to_qt.dotcode_to_qt_items(self._current_dotcode, self._options['highlight_level'])
  File "/opt/ros/indigo/lib/python2.7/dist-packages/qt_dotgraph/dot_to_qt.py", line 238, in dotcode_to_qt_items
    graph = pydot.graph_from_dot_data(dotcode.encode("ascii", "ignore"))
  File "/usr/local/lib/python2.7/dist-packages/pydot.py", line 220, in graph_from_dot_data
    return dot_parser.parse_dot_data(data)
NameError: global name 'dot_parser' is not defined
@tfoote tfoote added the bug label May 20, 2014
@dirk-thomas
Copy link
Contributor

Can you please verify that the patched version from branch https://github.com/ros-visualization/qt_gui_core/tree/pydot works correctly on Saucy?

dirk-thomas added a commit that referenced this issue May 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants