jamesfulford / cashflow-projector

Local-first SPA for personal finance planning
https://jamesfulford.github.io/cashflow-projector/
0 stars 0 forks source link

Setting "on" for ending causes error #67

Closed jamesfulford closed 9 months ago

jamesfulford commented 9 months ago
Traceback (most recent call last):
  File "/home/pyodide/engine/recur.py", line 37, in generate_event_transactions
    dates = get_dates(rule, context.parameters)
  File "/home/pyodide/engine/recur.py", line 20, in get_dates
    rule_generator = iter(rrulestr(rule["rule"], dtstart=start))
  File "/lib/python3.10/site-packages/dateutil/rrule.py", line 1732, in __call__
    return self._parse_rfc(s, **kwargs)
  File "/lib/python3.10/site-packages/dateutil/rrule.py", line 1652, in _parse_rfc
    return self._parse_rfc_rrule(lines[0], cache=cache,
  File "/lib/python3.10/site-packages/dateutil/rrule.py", line 1561, in _parse_rfc_rrule
    return rrule(dtstart=dtstart, cache=cache, **rrkwargs)
  File "/lib/python3.10/site-packages/dateutil/rrule.py", line 470, in __init__
    raise ValueError(
ValueError: RRULE UNTIL values must be specified in UTC when DTSTART is timezone-aware

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pyodide/engine/pyodide.py", line 34, in process_daybydays
    daybydays = generate_daybydays(context)
  File "/home/pyodide/engine/daybydays.py", line 26, in generate_daybydays
    transactions = get_transactions_up_to(context)
  File "/home/pyodide/engine/generate_instances.py", line 12, in get_transactions_up_to
    all_transactions = generate_event_transactions(context)
  File "/home/pyodide/engine/recur.py", line 52, in generate_event_transactions
    assert False, f"Rule `{rule_id}` is an invalid rrule per RFC 5545"
AssertionError: Rule `1706055664643` is an invalid rrule per RFC 5545
jamesfulford commented 9 months ago

The refresh was actually just a delayed re-render having to do with React Query doing 3 tries with space between.

I'm not sure how this wasn't happening before. I've removed "Z" from the end of the UNTIL part of the rrule string, and that resolves the issue.