Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
Is it possible that your PATH contains a non-directory? Because it can give results a NotADirectoryError: >>> subprocess.check_output(['xdg-settings', 'get', 'default-web-browser'], >>> env={'PATH': '/etc/hosts'}) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/serhiy/py/cpython/Lib/subprocess.py", line 429, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/serhiy/py/cpython/Lib/subprocess.py", line 510, in run with Popen(*popenargs, **kwargs) as process: File "/home/serhiy/py/cpython/Lib/subprocess.py", line 962, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/home/serhiy/py/cpython/Lib/subprocess.py", line 1840, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) NotADirectoryError: [Errno 20] Not a directory: 'xdg-settings' Reopened because I afraid that there may be a severe configuration error hidden by silencing NotADirectoryError. Could you please show os.environ['PATH'] on your computer? ---------- nosy: +serhiy.storchaka status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41754> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com