aceinnolab / Inkycal

Create awesome e-paper dashboards within minutes! Modularity? Check! Python3? Check? Works on Raspberry Pi Zero W? Check! Support for own modules? Check!
https://aceinnolab.github.io/Inkycal/
GNU General Public License v3.0
1.16k stars 125 forks source link

Help: settings.py: debugging help #105

Closed clone545 closed 4 years ago

clone545 commented 4 years ago

python3 Inky-Calendar/modules/inkycal.py does not launch - Gives below error:

Traceback (most recent call last):
  File "Inky-Calendar/modules/inkycal.py", line 12, in <module>
    from configuration import *
  File "/home/pi/Inky-Calendar/modules/configuration.py", line 14, in <module>
    from settings import *
  File "/home/pi/Inky-Calendar/modules/settings.py", line 1
    ical_urls = [https://calendar.google.com/calendar/ical/<account redacted>/basic.ics]
                      ^
SyntaxError: invalid syntax`

To Reproduce Steps to reproduce the behavior: Install BCM2835 libraries as per Waveshare setup guide: Link Install from bash -c "$(curl -sL https://raw.githubusercontent.com/aceisace/Inky-Calendar/master/Installer.sh)" as per guide Occurs on each run of python3 Inky-Calendar/modules/inkycal.py

Expected behavior Expect some activity on e-paper display Expect output to indicate running.

Screenshots See above error output

Desktop (please complete the following information):

Additional context settings.py:

ical_urls = [https://calendar.google.com/calendar/ical/<account redacted>/basic.ics]
rss_feeds = [http://feeds.bbci.co.uk/news/rss.xml]
update_interval = "20"
api_key = ""
location = "London, GB"
week_starts_on = "Monday"
calibration_hours = [0,12,18]
model = "epd_7_in_5_v2_colour"
language = "en"
units = "imperial"
hours = "24"
top_section = "inkycal_weather"
middle_section = "inkycal_calendar"
bottom_section = "inkycal_rss"
inkycal_image_path = "https://github.com/aceisace/Inky-Calendar/blob/master/Gallery/Inky-Calendar-logo.png?raw=true"
inkycal_image_path_body = ""

Any help to get this working would be appreciated.

aceisace commented 4 years ago

@clone545 Hi, thanks for your interest in the Inky-Calendar software :). Had a look at the bug-report. Thanks for using the provided tempate!

To help you with debugging, please follow the steps below:

settings file:

Installing drivers as per waveshare instructions

clone545 commented 4 years ago

Thanks for getting back to me so quickly!

I've added the quotes around the ical_urls and rss_feeds and that seems to be working and the script now seems to run:

python3 Inky-Calendar/modules/inkycal.py
Cleanup of previous images...Done
Initialising weather... Done
Calendar module: Generating image...Done
RSS module: Connectivity check passed. Generating image...Done
Current Date: 3 May 2020
Current Time: 14:08
-----------Main programm started now----------
Calibration.. not required. Continuing...
[Errno 2] No such file or directory: '/home/pi/Inky-Calendar/images/inkycal_weather.png'
Calendar module: Generating image...Done
RSS module: Connectivity check passed. Generating image...Done
Initialising E-Paper...Done
Sending image data and refreshing display...Done
Sending E-Paper to deep sleep...Done
12 Minutes left until next refresh
Cleanup of previous images...Done`

That said, when it says

Initialising E-Paper...Done Sending image data and refreshing display...Done 
Sending E-Paper to deep sleep...Done

there's still nothing showing on the display. Is there something i'm doing wrong here?

clone545 commented 4 years ago

Ok nevermind, I had the display set to "colour" and the API key has been generated but isn't activated yet which is why I assume the weather wasn't generating properly.

I'll give it another try in a few hours once the API key has hopefully been activated.

aceisace commented 4 years ago

@clone545 Good idea. The activation of the api-key does take some time (usually a few hours), but if the display still doesn't show anything, double-check your display model and set the correct model in the settings.py file: model = "epd_7_in_5_v2_colour"

clone545 commented 4 years ago

Yep, I've just tried it now and it seems to work when I manually run python3 Inky-Calendar/modules/inkycal.py

All I need to do now is make sure that it's running on boot and I think I'm done! Still need to find a frame though :)

Many thanks for your help in getting it going! Looking forward to see how this project evolves in future too!

clone545 commented 4 years ago

FYI the install script didn't install supervisor and manually copying the code into the expected config and running the supervisor reload & restart hasn't triggered the script to start, either immediately or after a reboot.

I've change the $USER parameters in the config to hard-coded match my current user account and still no joy.

I've managed to get it to run on boot though with an @reboot trigger in cron which triggers python3 /home/$USER/Inky-Calendar/modules/inkycal.py

aceisace commented 4 years ago

@clone545 Glad to hear it's working now :) If the installer didn't install supervisor, it means the option for auto-start was not activated. I'd recommend renaming your current Inky-Calendar folder and re-run the installer. You can skip the updating part, just be sure to activate the auto-start on boot option at the end. Once done, you can replace the default settings file with the one from the previous Inky-Calendar folder. The installer normally sets up everything for the current user, under normal circumstances, you don't need to change the supervisor setup-file.

About the frame, I'd recommend a deep case where you can hide all the electronics. Alternatively, you can check out the following two 3d-files for integrating it into a frame:

aceisace commented 4 years ago

@clone545 Has your issue been solved? If yes, please don't forget to close this issue. Thanks in advance.

clone545 commented 4 years ago

Ah yes, this was resolve (sorry, forgot to close the issue) Thanks again with your help with this one.