YoCodingMonster / OpenFreezeCenter-Lite

OpenFreezeCenter-Lite allows users to read/write and control the EC of laptops, specially MSI!
MIT License
15 stars 3 forks source link

Multiple errors when running script #4

Open onlymikey opened 1 year ago

onlymikey commented 1 year ago

Device: MSI GF63 Thin 11uc OS: Fedora Workstation 38 Desktop: gnome 44.5 (Wayland)

reproduce:

cloned project installed dependencies (ECTweaker and Config) getting this output when running sudo python3 OpenFreezeCenter-Lite.py :

Traceback (most recent call last):
  File "/home/mikey/Descargas/OpenFreezeCenter-Lite-2.0/OpenFreezeCenter-Lite.py", line 86, in <module>
    CONFIG_FILE = open("config.py", "r")
                  ^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'config.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mikey/Descargas/OpenFreezeCenter-Lite-2.0/OpenFreezeCenter-Lite.py", line 91, in <module>
    AUTO_SPEED_CPU = [ECT.read(0x72, 1), ECT.read(0x73, 1), ECT.read(0x74, 1), ECT.read(0x75, 1), ECT.read(0x76, 1), ECT.read(0x77, 1), ECT.read(0x78, 1)] # CPU FAN speed at LOWEST, LOWER, LOW, MEDIUM, HIGH, HIGHER, HIGHEST CPU TEMP
                      ^^^^^^^^^^^^^^^^^
  File "/home/mikey/miniconda3/lib/python3.11/site-packages/ECTweaker.py", line 39, in read
    with open(EC_IO_FILE,'r+b') as file:
         ^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/sys/kernel/debug/ec/ec0/io'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mikey/Descargas/OpenFreezeCenter-Lite-2.0/OpenFreezeCenter-Lite.py", line 107, in <module>
    AUTO_SPEED = config.AUTO_SPEED
                 ^^^^^^^^^^^^^^^^^
AttributeError: module 'config' has no attribute 'AUTO_SPEED'
Ritul13 commented 1 year ago

Same problem

YoCodingMonster commented 1 year ago

Will address this issue in an upcomming release!!

YoCodingMonster commented 1 year ago

Please try the new release and inform if the issue still persists!

Andrew-Bekhiet commented 1 year ago

I've run the latest release and I can confirm that the error still happens

YoCodingMonster commented 1 year ago

I've run the latest release and I can confirm that the error still happens

Please share the following details

Andrew-Bekhiet commented 1 year ago

Device: MSI GF63 Thin 11SC OS: Kubuntu 23.04 Kernel: 6.2.0-35-generic

Error:

Traceback (most recent call last):
  File "/media/androidq/data/Programs/OpenFreezeCenter/OFC-lite.py", line 115, in <module>
    CONFIG_FILE = open(PATH_TO_CONFIG, "r")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/media/androidq/data/Programs/OpenFreezeCenter/config.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/androidq/data/Programs/OpenFreezeCenter/OFC-lite.py", line 120, in <module>
    AUTO_SPEED_CPU = [ECT.read(0x72, 1), ECT.read(0x73, 1), ECT.read(0x74, 1), ECT.read(0x75, 1), ECT.read(0x76, 1), ECT.read(0x77, 1), ECT.read(0x78, 1)] # CPU FAN speed at LOWEST, LOWER, LOW, MEDIUM, HIGH, HIGHER, HIGHEST CPU TEMP
                      ^^^^^^^^^^^^^^^^^
  File "/media/androidq/data/Programs/OpenFreezeCenter/lib/python3.11/site-packages/ECTweaker.py", line 39, in read
    with open(EC_IO_FILE,'r+b') as file:
         ^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/sys/kernel/debug/ec/ec0/io'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/androidq/data/Programs/OpenFreezeCenter/OFC-lite.py", line 135, in <module>
    import config
ModuleNotFoundError: No module named 'config'
YoCodingMonster commented 1 year ago

Device: MSI GF63 Thin 11SC OS: Kubuntu 23.04 Kernel: 6.2.0-35-generic

Error:

Traceback (most recent call last):
  File "/media/androidq/data/Programs/OpenFreezeCenter/OFC-lite.py", line 115, in <module>
    CONFIG_FILE = open(PATH_TO_CONFIG, "r")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/media/androidq/data/Programs/OpenFreezeCenter/config.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/androidq/data/Programs/OpenFreezeCenter/OFC-lite.py", line 120, in <module>
    AUTO_SPEED_CPU = [ECT.read(0x72, 1), ECT.read(0x73, 1), ECT.read(0x74, 1), ECT.read(0x75, 1), ECT.read(0x76, 1), ECT.read(0x77, 1), ECT.read(0x78, 1)] # CPU FAN speed at LOWEST, LOWER, LOW, MEDIUM, HIGH, HIGHER, HIGHEST CPU TEMP
                      ^^^^^^^^^^^^^^^^^
  File "/media/androidq/data/Programs/OpenFreezeCenter/lib/python3.11/site-packages/ECTweaker.py", line 39, in read
    with open(EC_IO_FILE,'r+b') as file:
         ^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/sys/kernel/debug/ec/ec0/io'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/androidq/data/Programs/OpenFreezeCenter/OFC-lite.py", line 135, in <module>
    import config
ModuleNotFoundError: No module named 'config'

Looking at the above error, i can see that the issue is caused when we try to read/write from the EC file -> with open(EC_IO_FILE,'r+b') as file:

so 2 things can be done

Do keep me posted on which of the solution works for you!

Andrew-Bekhiet commented 1 year ago

Still getting the same error

Andrew-Bekhiet commented 1 year ago

Turns out secure boot was enabled, so my bad

YoCodingMonster commented 1 year ago

Great! Is is working as intended, or are there any issues!

kadevandermerwe commented 1 year ago

Great! Is is working as intended, or are there any issues!

Device: MSI GF65 OS: Debian 12 (Fresh install) Kernel: 6.1.0-13-amd64

Hey man, I'm SUPER new to linux, so please excuse the horrible formatting of questions. I have done everything according to the instructions;

Despite this I am still getting that initial error of that /sys/kernel/debug/ec/ec0/io no such file or directory, after running the script. It just doesn't seem to create the directory nor the config.py module.

EDIT: Listen, I have no clue what I did but I ran the script one more time and it "just worked". No help needed anymore!