xpra icon
Bug tracker and wiki

Opened 4 years ago

Closed 4 years ago

#1182 closed defect (worksforme)

which(pactl) fails with undescriptive error if /usr/bin/which is missing

Reported by: urzds Owned by: urzds
Priority: major Milestone: 0.17
Component: server Version: trunk
Keywords: Cc:

Description

My Xpra 0.17.0 server logs:

2016-04-20 17:15:02,175 which(pactl) error
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/sound/pulseaudio/pulseaudio_pactl_util.py", line 23, in which
    returncode, out, _ = safe_exec(cmd, log_errors=False)
  File "/usr/lib64/python2.7/site-packages/xpra/scripts/exec_util.py", line 13, in safe_exec
    process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

From this output it is not clear which file is missing. Some investigation reveals that which itself is not installed.

It would be nice if Xpra would not rely on which or fail more gracefully to allow easier debugging.

Change History (2)

comment:1 Changed 4 years ago by Antoine Martin

Owner: changed from Antoine Martin to urzds

r12449 improves the error handling, the message should now look like this:

Error: failed to run 'which pactl'
 [Errno 2] No such file or directory

As for being able to detect if "pactl" is installed without trying to execute it, feel free to suggest a better option I can implement.

comment:2 Changed 4 years ago by Antoine Martin

Resolution: worksforme
Status: newclosed

Not heard back, closing.

Note: See TracTickets for help on using tickets.