Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

sys-oled not starting

Featured Replies

Hello all,

 

This seems to be an issue related to the python script to start the program, any help will be appreciated for those with python programming understanding:

$ sudo systemctl status sys-oled.service
* sys-oled.service - System Starting on OLED Display
   Loaded: loaded (/etc/systemd/system/sys-oled.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2021-09-17 02:22:42 JST; 10s ago
  Process: 4425 ExecStart=/usr/bin/python3 /usr/local/bin/sys-oled --display ${display_model} (code=exited, status=1/FAILURE)
 Main PID: 4425 (code=exited, status=1/FAILURE)

Sep 17 02:22:42 nas python3[4425]:     main()
Sep 17 02:22:42 nas python3[4425]:   File "/usr/local/bin/sys-oled", line 132, in main
Sep 17 02:22:42 nas python3[4425]:     display_info(device)
Sep 17 02:22:42 nas python3[4425]:   File "/usr/local/bin/sys-oled", line 105, in display_info
Sep 17 02:22:42 nas python3[4425]:     draw.text((0, 0), cpu_usage(), font=font, fill="white")
Sep 17 02:22:42 nas python3[4425]:   File "/usr/local/bin/sys-oled", line 78, in cpu_usage
Sep 17 02:22:42 nas python3[4425]:     temp = psutil.sensors_temperatures()['f10e4078.thermal']
Sep 17 02:22:42 nas python3[4425]: KeyError: 'f10e4078.thermal'
Sep 17 02:22:42 nas systemd[1]: sys-oled.service: Main process exited, code=exited, status=1/FAILURE
Sep 17 02:22:42 nas systemd[1]: sys-oled.service: Failed with result 'exit-code'.

 

Thank you in advance for any hints or recommendations about how to solve this.

Sincerely,

The repo is on github, problematic line seems to be this one: https://github.com/kobol-io/sys-oled/blob/master/bin/sys-oled#L78

 

I do not have an OLED display attached  to my helios4 but running this simple python test script has worked. Maybe you can try it? Just put it in a file, make executable (chmod +x ) and run it. 

 

#!/usr/bin/env python3

import psutil

sens = psutil.sensors_temperatures()
temp = psutil.sensors_temperatures()['f10e4078.thermal']
print(sens)
print(temp)

 

Give us the output of the test script and also attach the 'armbianmonitor -u' output or tell us which exact version you are using.

 

 

  • Author

Hello @Heisath my apologies for the delayed response.  Find below the error I get when running the smaller python script you provided:
 

$ ./sys-oled2
Traceback (most recent call last):
  File "./sys-oled2", line 6, in <module>
    temp = psutil.sensors_temperatures()['f10e4078.thermal']
KeyError: 'f10e4078.thermal'

 

Seems very similar to the error result of the full `sys-oled` python script.

 

And here is the armbian command:
 

$ sudo armbianmonitor -u
System diagnosis information will now be uploaded to curl: (52) Empty reply from server
Please post the URL in the forum where you've been asked for.

 

I look forward to your advice.

 

Sincerely,

Edited by jairunet

A KeyError in Python is raised when you try to access a dictionary key that doesn't exist in the dictionary. This error occurs when you try to access a dictionary value using a key that doesn't exist in the dictionary. The error message typically includes the name of the key that was not found in the dictionary. 

 

To handle this error, you can either check if the key exists in the python dictionary before trying to access it, or use the .get() method which allows you to specify a default value to return if the key does not exist in the dictionary. 

 

my_dict = {"a": 1, "b": 2}
if "c" in my_dict:
    print(my_dict["c"])
else:
    print("Key 'c' not found in the dictionary")

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.