pauloromeira / onegram

This repository is no longer maintained.
MIT License
129 stars 5 forks source link

AttributeError: 'NoneType' object has no attribute 'get' #12

Closed lormayna closed 6 years ago

lormayna commented 6 years ago

I'm just trying to fidn some post with a specific tag and I get this error:

Traceback (most recent call last): File "bot.py", line 34, in for p in explore(tag=TAG): File "/home/lorenzo/project/instabot/lib/python3.6/site-packages/sessionlib/sessionlib.py", line 132, in _handle_generator for item in response: File "/home/lorenzo/project/instabot/lib/python3.6/site-packages/onegram/queries.py", line 54, in explore yield from explore_tag(session, tag) File "/home/lorenzo/project/instabot/lib/python3.6/site-packages/sessionlib/sessionlib.py", line 132, in _handle_generator for item in response: File "/home/lorenzo/project/instabot/lib/python3.6/site-packages/onegram/queries.py", line 61, in explore_tag yield from _iter_query(session, variables) File "/home/lorenzo/project/instabot/lib/python3.6/site-packages/onegram/queries.py", line 124, in _iter_query _iter_progress(session, data, progress) File "/home/lorenzo/project/instabot/lib/python3.6/site-packages/onegram/queries.py", line 142, in _iter_progress total = progress.setdefault('total', data.get('count', 0)) AttributeError: 'NoneType' object has no attribute 'get'

lormayna commented 6 years ago

I was just messed around the code. Forgot this issue, I'm closing it