Skip to content

The read function uses the wrong queue #20

Description

@AndreaManghi

Hello,
I'm using this library for a work project that needs to run on Linux and Windows with Gnuplot 5.4.8
I'm currently trying to produce an SVG from a gnuplot script generated with jinja, but I immediately noted that I was getting no response from gnuplot, "r" and "a" functions always returned an empty list.
First I tested the script obtained from jinja, using it directly from command line, and it worked.
So i digged a bit and I figured out that gnuplot was outputting on stdout, instead PyGnuplot was reading stderr.
I fixed the code by changing line 89 in PyGnuplot.py from:

line = self.q_err.get(timeout=timeout)

to:

line = self.q_out.get(timeout=timeout) 

It works for me, both on linux and windows, but i don't know if it works on every platform this library supports, and since it was made differently I'd like to ask more about this issue and if my fix could be a valid solution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions