Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Fix file not found error #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ewagner12
Copy link

This change adds a check for the existence of the hwmondir name file. This prevents the following error in my system:
Traceback (most recent call last):
File "run.py", line 23, in
wattman.main()
File "/home/$USER/WattmanGTK/WattmanGTK/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/hwmon3/name'

This error prevented the program from running.

It looks like hwmon3 is 'applesmc' so this could be a mac specific issue.

This change adds a check for the existence of the hwmondir name file. This prevents the following error: 
Traceback (most recent call last):
  File "run.py", line 23, in <module>
    wattman.main()
  File "/home/$USER/WattmanGTK/WattmanGTK/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/hwmon3/name'

This error prevented the program from running.
@antpk
Copy link

antpk commented Apr 6, 2020

Confirm this fixes the issue I was having too. Thank all

Don't think this is mac specific. I'm on an old 2 CPU system.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants