Jump to content

SHIH skshih

Members
  • Posts

    3
  • Joined

  • Last visited

  1. After reading a few more and getting to understand what the errors were I've realised what was the reason. from the error log of my post earlier, it seems that the problem comes from the line for getting my ip, but the code seems fine. So it gave me to feeling that my error was caused as crontab code runs before an ip was captured by the system after reboot so instead of my above crontab code, my new code is: and it works with no issues.
  2. I have just managed to get my error log Traceback (most recent call last): File "/home/sqms/stats.py", line 97, in <module> main() File "/home/sqms/stats.py", line 89, in main stats(oled) File "/home/sqms/stats.py", line 79, in stats draw.text((0, 0), hostname(), font=font2, fill=255) ^^^^^^^^^^ File "/home/sqms/stats.py", line 36, in hostname ip_address = output.split()[0] ~~~~~~~~~~~~~~^^^ IndexError: list index out of range
  3. Thank you for your detailed instructions! It works for me on my Orange Pi 3 LTS! (but I have to update my port to port=0) in both device.py and stats.py has anyone ever tried it with crontab too? my crontab code is: @reboot cd /home/[user]/ && /usr/bin/python3 /home/[user]/stats.py & When i run the script in crontab, it looks like that it couldn't the font file PixelOperator.ttf if it is run from crontab; my ssd1306 screen lights up, but it only shows gibberish. I even copied PixelOperator.ttf to /usr/share/fonts and /usr/local/share/fonts (and of course there is one in /home/[user]) but it still does not work...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines