Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running "run.sh" #7

Closed
ghost opened this issue Dec 21, 2020 · 9 comments
Closed

Error running "run.sh" #7

ghost opened this issue Dec 21, 2020 · 9 comments

Comments

@ghost
Copy link

ghost commented Dec 21, 2020

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
Copy link
Author

ghost commented Dec 21, 2020

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 defined screen-output.bmp' @ error/convert.c/ConvertImageCommand/3258.


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

bcm2835 init success !!!

After his, the device reboots.

@mendhak
Copy link
Owner

mendhak commented Dec 21, 2020

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
Copy link
Owner

mendhak commented Dec 21, 2020

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
Copy link
Author

ghost commented Dec 22, 2020

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
Copy link
Owner

mendhak commented Dec 22, 2020

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
Copy link

feh123 commented Dec 22, 2020

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
Copy link
Author

ghost commented Jan 12, 2021

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
Copy link
Owner

mendhak commented Jan 12, 2021

@pdavid-muc I see an issue similar to yours on the waveshare repo, have a look : waveshareteam/e-Paper#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
Copy link
Author

ghost commented Jan 18, 2021

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

@ghost ghost closed this as completed Jan 18, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants