-
Notifications
You must be signed in to change notification settings - Fork 1
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
Aaru fails with exit code 1 if Ipmlab is run from PyPi package #23
Comments
Update - if the packaged version of Ipmlab is launched from the terminal Aaru works as expected. So issue is definitely caused by Aaru's stdout/stderr handliing. Does this help: https://stackoverflow.com/questions/2804543/read-subprocess-stdout-line-by-line |
Update, changed call to Aaru to this (this sends all stout/stderr to a file): with open('/home/johan/test/ipmlab.stdout', "w") as outfile:
sub.run(args, stderr=sub.STDOUT, stdout=outfile) Result (from /ipmlab.stdout):
|
Possibly (un?)related : |
Todo: make minimal demo script that demonstrates the issue. |
Another twist to this - in Windows, setting "shell=True" gets rid of the terminal, and Aaru completes normally (in Linux this won't even run!): # Run Aaru as subprocess
p = sub.run(args, shell=True) In another interesting twist, if I change the above code and use the more low-level Popen method: p = sub.Popen(args, shell=True) In this case Ipmlab doesn't wait for aaru to complete. Remedied by adding: output, errors = p.communicate() Provisional solution: added OS-specific shell flag that makes sure everything at least works under Windows: 92f5a4e. In Linux, Aaru execution only works if ipmlab is launched from a terminal (launching from menu shortcut will result in failure). |
Opened Aaru issue for this: All works without problems on Linux Mint with the binaries of the Aaru 6.0 development version! |
Fixed now in Aaru: |
This happens under Linux Mint 19.3. No useful info from Aaru log/error log.
However, everything works fine when running Ipmlab from local script (launcher in Git repo). I suspect this has something to do with Aaru trying to write to stdout/stderr (which is shown in terminal for local script), and fact that stdout and stderr are not captured. But capturing stdout/stderr leads to the problems described here:
#16
The text was updated successfully, but these errors were encountered: