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

RRULE parsing error #8

Closed
bbrendon opened this issue Feb 28, 2020 · 12 comments
Closed

RRULE parsing error #8

bbrendon opened this issue Feb 28, 2020 · 12 comments
Labels
fixed Issue is believed to be fixed, but not yet verified by reporter not our bug There's a bug, but it's not in ics_calendar or how it calls the code where the bug exists

Comments

@bbrendon
Copy link

On-prem exchange server 2016. I can curl the URL okay but this integration doesn't seem to like it.

...
  File "/opt/python-venvs/hass/lib/python3.7/site-packages/tatsu/grammars.py", line 733, in parse
    return rule()
  File "/opt/python-venvs/hass/lib/python3.7/site-packages/tatsu/grammars.py", line 782, in parse
    result = self._parse_rhs(ctx, self.exp)
  File "/opt/python-venvs/hass/lib/python3.7/site-packages/tatsu/grammars.py", line 790, in _parse_rhs
    result = ctx._call(ruleinfo)
  File "/opt/python-venvs/hass/lib/python3.7/site-packages/tatsu/contexts.py", line 519, in _call
    result = self._recursive_call(ruleinfo)
  File "/opt/python-venvs/hass/lib/python3.7/site-packages/tatsu/contexts.py", line 548, in _recursive_call
    return self._invoke_rule(ruleinfo, self.memokey)
  File "/opt/python-venvs/hass/lib/python3.7/site-packages/tatsu/contexts.py", line 595, in _invoke_rule
    ruleinfo.impl(self)
  File "/opt/python-venvs/hass/lib/python3.7/site-packages/tatsu/grammars.py", line 296, in parse
    return ctx._token(self.token)
  File "/opt/python-venvs/hass/lib/python3.7/site-packages/tatsu/contexts.py", line 632, in _token
    self._error(token, exclass=FailedToken)
  File "/opt/python-venvs/hass/lib/python3.7/site-packages/tatsu/contexts.py", line 453, in _error
    raise self._make_exception(item, exclass=exclass)
tatsu.exceptions.FailedToken: (1:172) expecting '\r\n' :
DESCRIPTION:\n-------------------------------------------------------\nTicket ...
@franc6
Copy link
Owner

franc6 commented Feb 28, 2020

This might be a dumb question, but can you confirm you're running the latest code? This looks a lot like issue #5, which was also from an exchange server. Additionally, the fix for issue #7 should mean you don't see a stack trace like this.

@bbrendon
Copy link
Author

bbrendon commented Feb 28, 2020

Yup. Latest code. I manually downloaded calendar.py from master and did a diff. No results. I installed using HACS.

@franc6
Copy link
Owner

franc6 commented Feb 28, 2020

And you restarted Home Assistant? If so, please send me a copy of the ICS file in question, so I can look at it. If you need help in redacting info from it, please let me know, and I can give some guidance on that. If you don't want to post it even with info redacted, you can contact me more privately on the home assistant community forums as the user franc6. Thanks!

@bbrendon
Copy link
Author

I sent you a link to the file via the forum messages.

@franc6
Copy link
Owner

franc6 commented Mar 2, 2020

This is just a quick acknowledgement that I have the file, and can reproduce the problem. I'll reply again after I know more. Thanks again!

@franc6
Copy link
Owner

franc6 commented Mar 2, 2020

It looks like the library I'm using the parse the calendar file can't handle embedded TAB characters, and it should. If you're running HA on something with a bit more RAM and processing power than an rPi, and you consider the problem to be critical, let me know, and I'll put a work-around in place. Otherwise, please wait, as I'll be replacing that library over the next few weeks, to address this problem as well as a problem with being unable to use this on most rPis with anything but the smallest and simplest of calendars. I'm hoping that'll let me fix issue #6, too. This isn't a top priority project right now, so it's not getting a lot of my time, and I suspect I need to block off at least a whole day to make the necessary changes and test them with my much larger set of test files, now. :) Thanks again for your patience!

@bbrendon
Copy link
Author

bbrendon commented Mar 2, 2020

Got it. I can wait. I was trying Calendar integration because they talk about it on the podcast as being useful. Apparently everyone is using google?

@bbrendon
Copy link
Author

bbrendon commented Apr 9, 2020

@franc6 ping!! Since you've been locked in your house have you made any progress ? :)

@franc6
Copy link
Owner

franc6 commented Apr 9, 2020 via email

@franc6 franc6 added the fixed Issue is believed to be fixed, but not yet verified by reporter label Apr 14, 2020
@franc6
Copy link
Owner

franc6 commented Apr 30, 2020

There's a similar issue with the pre-release versions that use a different library.

I'm attaching a file that shows the problem. Note how the DTSTART for the event includes only date information (no time or time zone). The RRULE for the event has an UNTIL that includes a time. This mismatch causes problems for dateutil.rrule. There are a handful of open issues surrounding similar problems in dateutil.rrule.

issue8.txt

@franc6 franc6 changed the title not working with Exchange ical URL RRULE parsing error Apr 30, 2020
@franc6 franc6 added bug Something isn't working not our bug There's a bug, but it's not in ics_calendar or how it calls the code where the bug exists and removed fixed Issue is believed to be fixed, but not yet verified by reporter bug Something isn't working labels Apr 30, 2020
@franc6 franc6 mentioned this issue Nov 16, 2020
@franc6
Copy link
Owner

franc6 commented Oct 23, 2021

This should be fixed in the next release when using icalevents parser. An update to icalevents 0.1.26 addresses this issue.

@franc6 franc6 added the fixed Issue is believed to be fixed, but not yet verified by reporter label Jan 4, 2022
@franc6
Copy link
Owner

franc6 commented Jan 4, 2022

This should be fixed when using the rie parser.

@franc6 franc6 closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Issue is believed to be fixed, but not yet verified by reporter not our bug There's a bug, but it's not in ics_calendar or how it calls the code where the bug exists
Projects
None yet
Development

No branches or pull requests

2 participants