Skip to content

Spond.get_event() and Spond.get_group() fail with unexpected TypeError if no events/groups are available #136

@elliot-100

Description

@elliot-100

get_event() and get_group() call get_events() and get_groups(), which return None if no events/groups are available.

(Until I looked at it properly, I thought they returned empty lists.)

This appears to cause problems:

>       await s.get_event("ID1")

...
        if not self.events:
            await self.get_events()
        for event in self.events:
>           if event["id"] == uid:
E           TypeError: string indices must be integers

..\spond\spond.py:312: TypeError

I'm looking into this.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions