jspricke / python-remind

Python library to convert between Remind and iCalendar
GNU General Public License v3.0
13 stars 6 forks source link

Freq monthly with BYDAY=+3TU cause IndexError: tuple index out of range #14

Closed stacyharper closed 3 years ago

stacyharper commented 3 years ago

Hello there,

Thanks a lot for you works on this !

I wanna report a bug I'm facing using dav2rem.

Traceback (most recent call last):
  File "/home/stacy/.local/bin/dav2rem", line 8, in <module>
    sys.exit(main())
  File "/home/stacy/.local/lib/python3.9/site-packages/dav2rem.py", line 84, in main
    rem.append_vobject(readOne(vevent.data))
  File "/home/stacy/.local/lib/python3.9/site-packages/remind.py", line 485, in append_vobject
    outdat = self.to_reminders(ical)
  File "/home/stacy/.local/lib/python3.9/site-packages/remind.py", line 472, in to_reminders
    reminders = [self.to_remind(vevent, label, priority, tags, tail, sep,
  File "/home/stacy/.local/lib/python3.9/site-packages/remind.py", line 472, in <listcomp>
    reminders = [self.to_remind(vevent, label, priority, tags, tail, sep,
  File "/home/stacy/.local/lib/python3.9/site-packages/remind.py", line 403, in to_remind
    trigdates = Remind._parse_rruleset(vevent.rruleset)
  File "/home/stacy/.local/lib/python3.9/site-packages/remind.py", line 327, in _parse_rruleset
    rep.append('%d' % rruleset._rrule[0]._bymonthday[0])
IndexError: tuple index out of range

It seems that rruleset._rrule[0]._bymonthday is empty in this case

printing the rruleset._rrule[0] gives me RRULE:FREQ=MONTHLY;INTERVAL=3;BYDAY=+3TU

jspricke commented 3 years ago

I cannot reproduce this, which version of python-remind do you use? Can you paste the full event (with private data redacted)?

jspricke commented 3 years ago

Seems like this was fixed in https://github.com/jspricke/python-remind/commit/7321e5d8158797f8aa65a2b1d2aa0507039a5bcf, can you try?

stacyharper commented 3 years ago

oh right ! It seems to be related to my issue.

I use the 0.15 wich seems to be released the Jul 25 2020 wich precede the commit date

Does it feels possible to release anytime soon ?

ps: I installed it using pip

jspricke commented 3 years ago

I've released v0.16.0 including the fix.