-
Notifications
You must be signed in to change notification settings - Fork 16
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
datetime: offset-naive and offset-aware #2
Comments
I created a test calendar and attempted to induce the same error with combinations of time zones, including some that span midnight. No such luck. Any suggestions for troubleshooting this and figuring it out? |
Hi, I'll do some testing by myselfe, but it would be great if you could narrow the problem down. Could you print the |
I hope you had a great vacation! I'm going to be honest, my last programming language was a few Java classes in college 15 years ago. (The SQL I use on a daily basis hardly counts.) I can attempt to muddle through it, but if you've got something I can copy/paste into the command line, we'll probably both spend less time on this. |
I figured out how to run the function from the command line (with an arbitrary integer), but I'm utterly failing when trying to get it to print the list. Wherever I stick the print() command, I get syntax errors or messages that it isn't defined. Is it possible that try errors out and I can't print it because the except executes instead? (Again, sorry for my lack of python knowledge.) python -c 'from dataHelper import get_events; get_events(10)' |
It should work to just add
after line 31. You need to watch out for a correct indent (as it's pythons way of scoping). |
Added as line 32. (Turns out I'd actually figured this out, but because it resulted in no actionable data, I figured I'd done it wrong.)
Running it results in this:
|
Ok, could you please re-try it with the print in line 31?
|
Same result:
I did a little Googling, so I came up with a question: Does try/except mean that if that try fails at any point, it stops evaluating and immediately dumps what is in the except? If so, is there a way to make the result of event_list available to print in the except area? |
Thanks for testing. You understanding of the try/except is correct, |
That would be this, right? https://pypi.org/project/icalevents/#history In which case, that's unfortunate because it appears to be dead with no updates for a couple years. |
Yes, that's it. |
Thanks Louis - I appreciate it. I think I may tinker around with attempting to pull the calendar down with wget and seeing if I can work on a script to find the offending entries and potential remove/fix them if possible as a workaround. It's a two year old bug at this point and that makes me think it's not going to be resolved quickly. We can either close the issue since it's not your problem, or leave it open and I'll update you if I have success. |
I'm giving this a shot and running into an issue - it doesn't render any calendar events for me. I think it's because some events on my iCal calendar have time zone information associated with them.
Any ideas?
$ ./run_calendar.sh
INFO:app:2022-09-26 00:10:13.529526
INFO:app:Retrieving calendar infos
CRITICAL:app:can't compare offset-naive and offset-aware datetimes
INFO:app:Exporting finial images
INFO:app:Init display
INFO:app:Writing on display
INFO:app:Set display to sleep-mode
The text was updated successfully, but these errors were encountered: