speedyg0nz / MagInkCal

E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero
Apache License 2.0
3.11k stars 108 forks source link

ASCII Codec Issue #18

Closed ooglyboogly closed 1 year ago

ooglyboogly commented 1 year ago

When running the application on my Pi Zero WH, I am getting the below error in regards to Codec. I tried this on 3 separate Google Accounts, including one with an empty calendar, to ensure it was not some Event with bad characters (although it should be able to test for that ideally...).

Any idea what could be causing this, or a way to ensure proper encode happens? Obviously it happens after the time sync, but its happening before any rendering is done as my eink is still blank.

Other than using my own timezone in the config file and my own pickle file, I have not altered any code from the repo up till now.

Starting daily calendar update
Battery level at start: 100.000
Time synchronised to 2023-02-07 15:49:45.641810-06:00
'ascii' codec can't decode byte 0xe7 in position 1: ordinal not in range(128)
Completed daily calendar update
Checking if configured to shutdown safely - Current hour: 15
ooglyboogly commented 1 year ago

For some reason it seems my language encoding is not working as expected, adding this to my code in gcal.py fixed it: creds = pickle.load(token,encoding='latin1')