Lots of warnings on ikhal startup
Open
Nobody has claimed this yet.
needs info
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 233
- Avg merge
- 1h 44m
- Merged PRs (30d)
- 1
Description
Upon starting ikhal, the terminal is filled with warnings in the form of:
Unknown exception happened.
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/khal/khalendar/khalendar.py", line 330, in _update_vevent
update(event.raw, href=href, etag=etag, calendar=calendar)
File "/usr/lib/python3.8/site-packages/khal/khalendar/backend.py", line 214, in update
ical = utils.cal_from_ics(vevent_str)
File "/usr/lib/python3.8/site-packages/khal/utils.py", line 665, in cal_from_ics
return cal
UnboundLocalError: local variable 'cal' referenced before assignment
warning: Skipping <calendar-name-redacted>/<uui-redacted>1.ics: local variable 'cal' referenced before assignment
warning: This event will not be available in khal.
printing them all takes some time, so startup of the interface is largely delayed.
I'm on khal 0.10.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the warnings during ikhal startup and inspect khal/khalendar/utils.py, especially cal_from_ics around the reported line. Trace how the failure propagates through khal/khalendar/backend.py and khalendar.py; done means startup no longer spends substantial time printing repeated warnings and affected events have a defined outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100