Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using communicate() rather than read() in fileutils.run() #49

Open
samgdotson opened this issue Jun 23, 2022 · 0 comments
Open

Using communicate() rather than read() in fileutils.run() #49

samgdotson opened this issue Jun 23, 2022 · 0 comments

Comments

@samgdotson
Copy link
Contributor

samgdotson commented Jun 23, 2022

I'm in the process of developing an ABCE plugin for watts (#48 ) yet, when I run ABCE via watts, the program hangs.

I narrowed the problem down to run() in fileutils.py. Specifically, the program hangs after stdout_data = p.stdout.read() is called.

p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                         universal_newlines=True)

while True:
    select.select([p.stdout, p.stderr], [], [])

    stdout_data = p.stdout.read()
    stderr_data = p.stderr.read()

I think this should be changed to communicate() per the subprocess documentation.

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

Successfully merging a pull request may close this issue.

1 participant