Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

[77] Basic pydot usage error #14

Open
prmtl opened this issue Mar 8, 2015 · 0 comments
Open

[77] Basic pydot usage error #14

prmtl opened this issue Mar 8, 2015 · 0 comments

Comments

@prmtl
Copy link
Contributor

prmtl commented Mar 8, 2015

Reported by [email protected], 2012-11-05T21:31:34Z

What steps will reproduce the problem?
  1. Use Python 3.2.3 on fedora and pydot port to Python3
  2. try following code:
    import pydot
    P = pydot.Dot()
    D = P.create_dot().decode('utf-8')
    print(D)
    Q=pydot.graph_from_dot_data(D)
What is the expected output? What do you see instead?

Expected result is no error. I get the following error:
$python3.2 foo1.py
digraph G {
node [label="\N"];
graph [bb="0,0,0,0"];
}

Traceback (most recent call last):
File "foo1.py", line 5, in
Q=pydot.graph_from_dot_data(D)
File "/nh/nest/u/aric/.local/lib/python3.2/site-packages/pydot-1.0.15-py3.2.egg/pydot.py", line 211, in graph_from_dot_data
return dot_parser.parse_dot_data(data)
File "/nh/nest/u/aric/.local/lib/python3.2/site-packages/pydot-1.0.15-py3.2.egg/dot_parser.py", line 472, in parse_dot_data
if data.startswith( codecs.BOM_UTF8 ):
TypeError: startswith first arg must be str or a tuple of str, not bytes

For more information, please see: networkx/networkx#790

What version of the product are you using? On what operating system?

Fedora 17, x86_64
Pydot - newest version from Python3 branch: https://bitbucket.org/prologic/pydot/overview
Python 3.2.3
python3-pyparsing 1.5.6

Please provide any additional information below.

From: https://code.google.com/p/pydot/issues/detail?id=77

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant