BoukeHaarsma23 / WattmanGTK

A Wattman-like GTK3+ GUI
GNU General Public License v2.0
372 stars 61 forks source link

subprocess.CalledProcessError: Command 'lspci | grep -E "^.*(VGA|Display).*\[AMD\/ATI\].*$" | grep -Eo "^([0-9a-fA-F]+:[0-9a-fA-F]+.[0-9a-fA-F])"' returned non-zero exit status 1. #78

Closed ThatRedKite closed 5 years ago

ThatRedKite commented 5 years ago

when i try to run it on my system (Opensuse Tumbleweed, RX 480, kernel 5.3) the following error occurs:

Traceback (most recent call last):
  File "/usr/bin/wattmanGTK", line 11, in <module>
    load_entry_point('WattmanGTK==0.0.1', 'console_scripts', 'wattmanGTK')()
  File "/usr/lib/python3.7/site-packages/WattmanGTK-0.0.1-py3.7.egg/WattmanGTK/wattman.py", line 108, in main
    amd_pci_ids = subprocess.check_output("lspci | grep -E \"^.*(VGA|Display).*\[AMD\/ATI\].*$\" | grep -Eo \"^([0-9a-fA-F]+:[0-9a-fA-F]+.[0-9a-fA-F])\"", shell=True).decode().split()
  File "/usr/lib64/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'lspci | grep -E "^.*(VGA|Display).*\[AMD\/ATI\].*$" | grep -Eo "^([0-9a-fA-F]+:[0-9a-fA-F]+.[0-9a-fA-F])"' returned non-zero exit status 1.
ThatRedKite commented 5 years ago

okay i looked a bit at the wattman.py by adding a sudo to every lspci command it started working: