python-twitter: Location stream throws TwitterError

>>> for line in twitter_api.GetStreamFilter(locations=["2.1,41.1,2.3,41.5"]):
...     Print line
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/simon/Nightyspace/venv/lib/python2.7/site-packages/twitter/api.py", line 4430, in GetStreamFilter
    data = self._ParseAndCheckTwitter(line.decode('utf-8'))
  File "/Users/simon/Nightyspace/venv/lib/python2.7/site-packages/twitter/api.py", line 4696, in _ParseAndCheckTwitter
    raise TwitterError({'message': "json decoding"})
twitter.error.TwitterError: {'message': 'json decoding'}
>>> 

How can I debug this ?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (14 by maintainers)

Commits related to this issue

Most upvoted comments

There’s also a guide here: http://python-twitter.readthedocs.io/en/latest/getting_started.html if you want to confirm that you’re using the correct access tokens with the correct application

We seem to have two problems happening - one is that when Twitter returns a 401 (Authorization Required) we are trying to parse the html as json .

The other is that our request seems to be different than what the sample dev.twitter.com OAUTH test generates.

I’m looking into both today.