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

ical.py example script fails #51

Closed
elliot-100 opened this issue Jan 10, 2023 · 2 comments
Closed

ical.py example script fails #51

elliot-100 opened this issue Jan 10, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@elliot-100
Copy link
Collaborator

...
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,...)

@elliot-100 elliot-100 added the bug Something isn't working label Jan 10, 2023
@Olen
Copy link
Owner

Olen commented Jan 11, 2023

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
Copy link
Owner

Olen commented Jan 12, 2023

Fixed

@Olen Olen closed this as completed Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants