This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: check_output is returning non-zero exit status 1
Type: Stage: resolved
Components: macOS Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: jagadeesh, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2019-03-17 20:55 by jagadeesh, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg338140 - (view) Author: Jagadeesh Marella (jagadeesh) Date: 2019-03-17 20:55
>>>> check_output(["screen", "-ls"])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/subprocess.py", line 316, in check_output
    **kwargs).stdout
  File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['screen', '-ls']' returned non-zero exit status 1
msg338141 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-03-17 21:17
Did you try running the same command "screen -ls" with subprocess.run() so you can see the output from it?  Or just from a terminal shell?  If I do, I see:

>>> subprocess.run(["screen", "-ls"])
No Sockets found in /var/folders/sn/0m4rnbyj2z1byjs68sz838300000gn/T/.screen.

CompletedProcess(args=['screen', '-ls'], returncode=1)

$ screen -ls
No Sockets found in /var/folders/sn/0m4rnbyj2z1byjs68sz838300000gn/T/.screen.

So subprocees.check_output() is likely working just fine: it is telling you that the command you tried to execute failed for some reason.
History
Date User Action Args
2022-04-11 14:59:12adminsetgithub: 80512
2019-03-17 21:17:49ned.deilysetstatus: open -> closed
type: compile error ->
messages: + msg338141

resolution: not a bug
stage: resolved
2019-03-17 20:55:32jagadeeshcreate