[Tutor] Query regarding file conversion - DOT files

Niharika Jakhar niharika1883 at gmail.com
Wed Jan 8 12:38:12 EST 2020


No, it doesn't work for me.
Error:
graph.write_png('hellow.png')

AttributeError: 'list' object has no attribute 'write_png'

On Wed, Jan 8, 2020 at 6:28 PM Robert Alexander <gogonegro at gmail.com> wrote:

> Should’nt the line be
>
> graph = pydot.graph_from_dot_file('hello.dot’)
>
> ?
>
> HTH
> Robert
>
>
> On 8 January 2020 at 18:25:30, Niharika Jakhar (niharika1883 at gmail.com)
> wrote:
>
> Hello
>
> I am a masters student, and beginner in python programming. I seek help
> and
> guidance from the tutors here. Thanks in advance.
>
> Problem: Convert DOT files to PDF.
>
> 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
>
>
>
> Python version: 3.7.4
> Development environment: Spyder
>
> Best regards
> Niharika
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
>


More information about the Tutor mailing list