Loading

Paste #pkglvrtjk

  1. >>> g = pydot.graph_from_dot_data(open('test.dot', 'r').read())
  2. Traceback (most recent call last):
  3.   File "<stdin>", line 1, in <module>
  4.   File "/usr/lib/python3/dist-packages/pydot.py", line 220, in graph_from_dot_data
  5.     return dot_parser.parse_dot_data(data)
  6.   File "/usr/lib/python3/dist-packages/dot_parser.py", line 510, in parse_dot_data
  7.     if data.startswith(codecs.BOM_UTF8):
  8. TypeError: startswith first arg must be str or a tuple of str, not bytes
  9.  
  10.  
  11. >>> g = pydot.graph_from_dot_data(open('test.dot', 'rb').read())
  12. Traceback (most recent call last):
  13.   File "<stdin>", line 1, in <module>
  14.   File "/usr/lib/python3/dist-packages/pydot.py", line 220, in graph_from_dot_data
  15.     return dot_parser.parse_dot_data(data)
  16.   File "/usr/lib/python3/dist-packages/dot_parser.py", line 520, in parse_dot_data
  17.     tokens = graphparser.parseString(data)
  18.   File "/usr/lib/python3/dist-packages/pyparsing.py", line 1115, in parseString
  19.     loc, tokens = self._parse( instring, 0 )
  20.   File "/usr/lib/python3/dist-packages/pyparsing.py", line 983, in _parseNoCache
  21.     preloc = self.preParse( instring, loc )
  22.   File "/usr/lib/python3/dist-packages/pyparsing.py", line 940, in preParse
  23.     loc = self._skipIgnorables( instring, loc )
  24.   File "/usr/lib/python3/dist-packages/pyparsing.py", line 932, in _skipIgnorables
  25.     loc,dummy = e._parse( instring, loc )
  26.   File "/usr/lib/python3/dist-packages/pyparsing.py", line 989, in _parseNoCache
  27.     loc,tokens = self.parseImpl( instring, preloc, doActions )
  28.   File "/usr/lib/python3/dist-packages/pyparsing.py", line 2624, in parseImpl
  29.     return self.expr._parse( instring, loc, doActions, callPreParse=False )
  30.   File "/usr/lib/python3/dist-packages/pyparsing.py", line 989, in _parseNoCache
  31.     loc,tokens = self.parseImpl( instring, preloc, doActions )
  32.   File "/usr/lib/python3/dist-packages/pyparsing.py", line 2483, in parseImpl
  33.     ret = e._parse( instring, loc, doActions )
  34.   File "/usr/lib/python3/dist-packages/pyparsing.py", line 983, in _parseNoCache
  35.     preloc = self.preParse( instring, loc )
  36.   File "/usr/lib/python3/dist-packages/pyparsing.py", line 945, in preParse
  37.     while loc < instrlen and instring[loc] in wt:
  38. TypeError: 'in <string>' requires string as left operand, not int

Comments