tsyesika/PyPump

Error when indexing an activity from an activity list: 'ItemList' object does not support indexing

Closed this issue · 1 comments

Hello,

Following the tutorial, I have met some issues trying out Pypump functionalities. Here is one of them about major activities.

recent_activities = me.inbox.major[:30]
for activity in recent_activities:
... print(activity)
<Activity: username@pump.io posted note>
<Activity: username@pump.io posted image>
<Activity: username@pump.io posted image>
activity = recent_activities[0]
This is where I get the following error: TypeError: 'ItemList' object does not support indexing

I am familiar with programming in general but Python is new to me and have not found a way to solve that issue myself yet. So my question is, since I have not found any issue concerning this, should this be working in the latest version of Pypump, and if so, how could I fix this?
I am also having other issues about attributes of various instances, commenting notes/images (not going to list them all here, although I could).

Thanks for your time.

It should be working however i believe it's a bug. I'll try and get it fixed. As a temporary work around try casting recent_activities to a list and index off that. Thanks for reporting the bug.