[Tutor] Query regarding file conversion - DOT files
Mats Wichmann
mats at wichmann.us
Wed Jan 8 12:52:34 EST 2020
On 1/8/20 10:42 AM, Alan Gauld via Tutor wrote:
> On 08/01/2020 12:56, Niharika Jakhar wrote:
>
>> I came across pydot for this and tried following:
>> #####code####
>> import os
>> import pydot
>> (graph,) = pydot.graph_from_dot_file('hello.dot')
>> graph.write_png('hellow.png')
>>
>> Error:
>> assert process.returncode == 0, process.returncode
>>
>> AssertionError: 1
>
> Please, always post the full error trace, do not summarize
> or shorten it. They contain a lot of useful detail and
> without it we are only making guesses.
what he said :)
Is graphviz installed? I believe pydot and its descendants (like
pydotplus) require an installation of graphviz, which does not come in
when you install pydot*.
if the failure comes from the graph.write_png call - we can't tell
because the proper error trace is missing - this may well be the issue,
it's either not installed, or not found.
More information about the Tutor
mailing list