Giter Site home page Giter Site logo

Invalid Alarm Action about inkycal HOT 6 CLOSED

Ahbrown41 avatar Ahbrown41 commented on August 15, 2024
Invalid Alarm Action

from inkycal.

Comments (6)

aceisace avatar aceisace commented on August 15, 2024

@Ahbrown41
Hi Alex,
thank you for your interest in this software and for the compliments of the new version :)

I need to take a deeper look to find out where exactly the issue lies. I‘ll get back to this on Monday as I‘m not at home at the moment. On Monday, I‘ll let you know more about it.

For now, could you please tell me what action you‘re using as triggers for events? Thanks in advance

from inkycal.

Ahbrown41 avatar Ahbrown41 commented on August 15, 2024

It appears NONE throws it off. I will look for some examples that are not private :-)

from inkycal.

aceisace avatar aceisace commented on August 15, 2024

@Ahbrown41
Thanks for your help. It seems there are quite a few issues with ics.py parsing iCalendar URLs. Although there are fixes available, it would maybe be better to switch to a updated or more advanced library, like the icalendar one (see here). What's your opinion?

from inkycal.

aceisace avatar aceisace commented on August 15, 2024

@Ahbrown41
I've more or less understood where the errors are coming from. I'll try finding a fix for this issue and add it in the E-Paper.py file. On the other hand, if you manage to find a way that prevents these errors, please share it here. Thanks in advance

from inkycal.

aceisace avatar aceisace commented on August 15, 2024

@Ahbrown41
OK, I've tested out a few things. For now, this is the solution that works:
Could you please try to see if the error from your icalendar persists when using the below snippet? Thanks.

from ics import Calendar, Event
from urllib.requests import urlopen

ical_urls = [
"iCalendar-url"
]

elist = [] #create empty event list
for icalendars in ical_urls:
    decode = str(urlopen(icalendars).read().decode()) #create a string first
    #fix errors related to invalid alarm action
    fix_e = decode.replace('BEGIN:VALARM\r\nACTION:NONE','BEGIN:VALARM\r\nACTION:DISPLAY\r\nDESCRIPTION:')
    ical = Calendar(fix_e)
    for events in ical.events:
        if(time.now().strftime('%Y-%-m') == (events.begin).format('YYYY-M')):
            elist.append(events.name+" on " +events.begin.format('D MMM YYYY'))
print(elist)

from inkycal.

aceisace avatar aceisace commented on August 15, 2024

I've tested out the snippet from above which 'bypasses' the invalid Alarm action. I've tested the new snippet for a few days and so far, no errors have shown up. Therefore, I've replaced the old snippet with the new one (from the above comment).

As this issue has been fixed, I'll be closing it now. Should you feel a need to re-open the issue, feel free to do so.

from inkycal.

Related Issues (20)

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.