BoukeHaarsma23 / WattmanGTK

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

Problem identifying sensor paths if 'name' does not exist #67

Open thxcv opened 5 years ago

thxcv commented 5 years ago

Hi, i got the following error starting wattmanGTK, as my hwmon0 modules name is in "/sys/class/hwmon/hwmon0/device/name" rather than "/sys/class/hwmon/hwmon0/name".

Reading clock states and limits.
Traceback (most recent call last):
  File "run.py", line 23, in <module>
    wattman.main()
  File "wattman.py", line 150, in main
    if open(hwmondir + folder + '/name').readline().rstrip() == 'amdgpu':
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/hwmon/hwmon0/name'

I worked around this problem by adding 'if os.path.isfile(hwmondir + folder + '/name'):' in line 150 of wattman.py.