Olen/Spond

`ical.py` example script fails

Closed this issue · 2 comments

...
File "C:\Users\Elliot\dev\Olen-Spond\ical.py", line 34, in main
    event["location"]["feature"], event["location"]["address"]
KeyError: 'address'
...

Presume a Spond event doesn't have any address.
Realise this script is only intended as an example implementation.

(Issues like this could be spotted more easily during dev by assuming most (all)? attributes are optional, adding type hints to Spond codebase accordingly, then using mypy or similar,...)

Olen commented

Works here, but I guess I have addresses for all locations. But I'll create a PR that adds .get() around these for the example.

Olen commented

Fixed