question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Location stream throws TwitterError

See original GitHub issue
>>> 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 ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
jeremylowcommented, Jul 11, 2016

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

1reaction
bearcommented, Jul 11, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tweepy location on Twitter API filter always throws 406 error
I'm using the following code (from django management commands) to listen to the Twitter stream - I've used the same code on a...
Read more >
Twitter API Response Codes & Error Support - Twitter Developer
Get Twitter API response codes and error support through Twitter Developer here.
Read more >
TwitterStreamImpl - Twitter4J
A java representation of the Streaming API: Methods ... public StatusStream getFirehoseStream(int count) throws TwitterException. Returns a status stream of ...
Read more >
Introduction to Twitter4J - Baeldung
public String createTweet(String tweet) throws TwitterException { Twitter ... Twitter Streaming API is useful when updates are required in ...
Read more >
twitter4j.Twitter.getHomeTimeline java code examples - Tabnine
@Override protected List<Status> initialLoad(final Twitter twitter) throws TwitterException { return twitter.getHomeTimeline() .stream() ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found