mendhak / waveshare-epaper-display

At-a-glance dashboard for Raspberry Pi with a Waveshare ePaper 7.5 Inch HAT. Date/Time, Weather, Alerts, Google/Outlook Calendar
https://code.mendhak.com/raspberrypi-epaper-dashboard/
438 stars 65 forks source link

Error running "run.sh" #7

Closed ghost closed 3 years ago

ghost commented 3 years ago

I'd like to built a screen displaying current or future meetings, i don't need the PiHole or Weather integration. I followed your instructions, apart from installing python-imaging (which was not available), i installed "python-pil" (apt recommended that).

In Google, i enabled the Google Calendar API and instead for "Desktop App" i went for "TVs and limited input devices" (does that make a difference? Selecting desktop app did not work for me). After using 'curl' for the localhost-URL, this is was the script outputs:

ickle is stale, calling the Calendar API (calendar entry of the day) (next calendar entry) Traceback (most recent call last): File "screen-calendar-get.py", line 80, in output = codecs.open(template , 'r', encoding='utf-8').read() File "/usr/lib/python3.7/codecs.py", line 898, in open file = builtins.open(filename, mode, buffering) FileNotFoundError: [Errno 2] No such file or directory: 'screen-output-weather.svg'

Did i miss something? I have a raspberry pi zero WH, the Display you've mentioned and accessories.

ghost commented 3 years ago

Weid. I cannot run examples:

~/waveshare-epaper-sample/RaspberryPi_JetsonNano/python/examples $ sudo python3 epd_7in5_V2_test.py INFO:root:epd7in5_V2 Demo INFO:root:init and Clear

The wifi connection drops then (reboot i guess).. there is nothing displayed.

Running "run.sh":

pi@host:~/waveshare-epaper-display $ ./run.sh


/ _| | | _ | | () / _| | | / | |/ _ \ '_ \ / _ |/ _` | '| | | ' | | / _ \ | || (_| | | / | | | (| | (| | | | | | | | | () | ___,||\|| ||_,|_,|| ||| ||_| ___/

Found cached calendar response (some calendar entry) (some other calendar entry) Traceback (most recent call last): File "screen-calendar-get.py", line 80, in output = codecs.open(template , 'r', encoding='utf-8').read() File "/usr/lib/python3.7/codecs.py", line 898, in open file = builtins.open(filename, mode, buffering) FileNotFoundError: [Errno 2] No such file or directory: 'screen-output-weather.svg'


| _| _ __ | | | | \ \/ / ' \ / | '| | | | > <| |) | () | | | | |____//_\ ./ __/|| _| || Entity: line 1: parser error : Document is empty

^ Message: 16:23:09.331: The preferences file /home/pi/.config/inkscape/preferences.xml is not a valid XML document. Message: 16:23:09.333: Inkscape will run with default settings, and new settings will not be saved. Failed to get connection (inkscape:511): CRITICAL : 16:23:09.472: dbus_g_proxy_new_for_name: assertion 'connection != NULL' failed

(inkscape:511): CRITICAL : 16:23:09.474: dbus_g_proxy_call: assertion 'DBUS_IS_G_PROXY (proxy)' failed

(inkscape:511): CRITICAL : 16:23:09.477: dbus_g_connection_register_g_object: assertion 'connection != NULL' failed

(inkscape:511): WARNING : 16:23:15.545: Can't open file: screen-output-weather.svg (doesn't exist)

(inkscape:511): WARNING : 16:23:15.558: Can't open file: screen-output-weather.svg (doesn't exist)

(inkscape:511): WARNING : 16:23:15.561: Specified document screen-output-weather.svg cannot be opened (does not exist >or not a valid SVG file) convert-im6.q16: unable to open image screen-output.png': No such file or directory @ error/blob.c/OpenBlob/2874. convert-im6.q16: no images definedscreen-output.bmp' @ error/convert.c/ConvertImageCommand/3258.


| () | | _ | | | | / | ' | |/ ` | | | | | || | _ \ |) | | (| | |_| | |/|_|_/ ._/||_,|\, | |_| |___/ 0

bcm2835 init success !!!

After his, the device reboots.

mendhak commented 3 years ago

The first problem is easy enough - it happens because the screen-weather-get script is taking screen-template.svg and renaming it to screen-output-weather.svg and some of the subsequent scripts are expecting that svg to exist. I assume you've commented that bit out so no such file gets produced.

You could try making a copy of the screen-template.svg and call it screen-output-weather.svg so that the calendar script can find the file.

mendhak commented 3 years ago

I think try to get the samples working first. If those don't work, this project won't.

You'll later run into another problem - which is this project was written for the v1 screens and you probably have the v2 screens. I'm just working on a script for that right now that might help.

But in the meantime try to get the demo working.

ghost commented 3 years ago

Thank you for your reply. Yes, i have the V2 screen. Trying to run the examples results in a device reboot. I'm running buster lite, does that make a difference?

mendhak commented 3 years ago

I really don't know why even the samples would result in a reboot, you'll have to troubleshoot this. It could be not enough power being supplied (try a higher Amp charger, power from mains instead of computer, something like that), it could be the OS (sure you can try Raspbian Stretch), just to eliminate variables.

feh123 commented 3 years ago

Hi @pdavid-muc I used the Raspberry Pi Imager and downloaded the recommended version. I followed @mendhak's advice re using the demo. It worked almost straightaway - I never saw a reboot error.

ghost commented 3 years ago

I have really no idea what i am doing wrong. Tried different power source (2.4A). Did exactly what is described in the readme. When i try to run the demo:

~/e-Paper/RaspberryPi_JetsonNano/python $ sudo python3 examples/epd_7in5_V2_test.py
INFO:root:epd7in5_V2 Demo
INFO:root:init and Clear

The raspberry pi just restarts.

mendhak commented 3 years ago

@pdavid-muc I see an issue similar to yours on the waveshare repo, have a look : https://github.com/waveshare/e-Paper/issues/92

It also looks like it's worth emailing Waveshare directly since what you're experiencing doesn't seem to be normal - their screen with their own sample code isn't working.

ghost commented 3 years ago

I'll have a look there - thank you very much!