Code Monkey home page Code Monkey logo

Comments (12)

kwschnei avatar kwschnei commented on August 29, 2024

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?

from einkcalendar.

13Bytes avatar 13Bytes commented on August 29, 2024

Hi,
sorry for the late reply (I'm now back from vacation 😄)

I'll do some testing by myselfe, but it would be great if you could narrow the problem down.
For debugging purposes it's probably helpful to just directly call the get_events() function inside dataHelper.py.

Could you print the event_list from dataHelper.py, Line 30?
This will eliminate the possibility of a problem in the icalevents-lib and give some more insights (without compromising your calendar)

from einkcalendar.

kwschnei avatar kwschnei commented on August 29, 2024

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.

from einkcalendar.

kwschnei avatar kwschnei commented on August 29, 2024

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)'

from einkcalendar.

13Bytes avatar 13Bytes commented on August 29, 2024

It should work to just add

        print(event_list)

after line 31. You need to watch out for a correct indent (as it's pythons way of scoping).
The call of the function itself looks good 👍

from einkcalendar.

kwschnei avatar kwschnei commented on August 29, 2024

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.)

    try:
        event_list = events(WEBDAV_CALENDAR_URL, fix_apple=WEBDAV_IS_APPLE)
        event_list.sort(key=sort_by_date)
        print(event_list)
        
        start_count = 0

Running it results in this:

kwschnei@pical:~/eInkCalendar $ python -c 'from dataHelper import get_events; get_events(10)'
can't compare offset-naive and offset-aware datetimes

from einkcalendar.

13Bytes avatar 13Bytes commented on August 29, 2024

Ok, could you please re-try it with the print in line 31?

    try:
        event_list = events(WEBDAV_CALENDAR_URL, fix_apple=WEBDAV_IS_APPLE)
        print(event_list)
        event_list.sort(key=sort_by_date)

from einkcalendar.

kwschnei avatar kwschnei commented on August 29, 2024
    try:
        event_list = events(WEBDAV_CALENDAR_URL, fix_apple=WEBDAV_IS_APPLE)
        print(event_list)
        event_list.sort(key=sort_by_date)
        
        start_count = 0

Same result:

kwschnei@pical:~/eInkCalendar $ python -c 'from dataHelper import get_events; get_events(10)'
can't compare offset-naive and offset-aware datetimes

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?

from einkcalendar.

13Bytes avatar 13Bytes commented on August 29, 2024

Thanks for testing.
This means the problem is surprisingly inside the icalevents library : /

You understanding of the try/except is correct,
but it can't be used in the way you describe, as the error would be triggered inside the except-block and the hole programm would crash.

from einkcalendar.

kwschnei avatar kwschnei commented on August 29, 2024

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.

from einkcalendar.

13Bytes avatar 13Bytes commented on August 29, 2024

Yes, that's it.
The github-page seems alive. I even found the issue:
jazzband/icalevents#69

from einkcalendar.

kwschnei avatar kwschnei commented on August 29, 2024

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.

from einkcalendar.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.