`twitter.error.TwitterError: [{'message': 'Sorry, that page does not exist.', 'code': 34}]` while trying to get direct messages
See original GitHub issueI’m getting a twitter.error.TwitterError: [{'code': 34, 'message': 'Sorry, that page does not exist'}]
on python 3.5 using python-twitter==3.5.0
. I’ve been reading through an older issue #587 and that doesn’t seem to work properly.
Api.GetDirectMessages
uses url = '%s/direct_messages.json' % self.base_url
(https://github.com/bear/python-twitter/blob/v3.5/twitter/api.py#L2920), which appears to be the old url.
I changed it to url = '%s/direct_messages/events/list.json' % self.base_url
and now run into this:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/var/www/brownpapersession/alpha/brownpapersession/various/tweet.py", line 62, in get_direct_messages
messages = twitter.GetDirectMessages()
File "/var/www/brownpapersession/alpha/env/lib/python3.5/site-packages/twitter/api.py", line 2943, in GetDirectMessages
return [DirectMessage.NewFromJsonDict(x) for x in data]
File "/var/www/brownpapersession/alpha/env/lib/python3.5/site-packages/twitter/api.py", line 2943, in <listcomp>
return [DirectMessage.NewFromJsonDict(x) for x in data]
File "/var/www/brownpapersession/alpha/env/lib/python3.5/site-packages/twitter/models.py", line 88, in NewFromJsonDict
json_data = data.copy()
AttributeError: 'str' object has no attribute 'copy'
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:10
Top Results From Across the Web
Twitter API Response Codes & Error Support - Twitter Developer
The Twitter API provides the following response and error codes to help understand and debug in the moment.Use the debugging guide and error...
Read more >[ { "code" : 34 , "message" : "Sorry, that page does not exist ...
Hello, my coworker has reported theses same bugs before: Direct messages - Error code 34 on call direct_messages/events/show - #2 by ...
Read more >Sorry, that page does not exist code 34 - Stack Overflow
A quick way to verify whether the users in the exception really have deleted their account/status will be go and check on twitter....
Read more >Twitter Page In Uiwebview Redirects To 'Sorry, That ... - ADocLib
TwitterError: [{'message': 'Sorry, that page does not exist.', 'code': 34}]` while trying to get direct messages. I'm getting a twitter.error.TwitterError:.
Read more >Python - API.destroy_direct_message() in Tweepy
print ( "This direct message no longer exists." ) ... tweepy.error.TweepError: [{'code': 34, 'message': 'Sorry, that page does not exist.'}].
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Anyone that needs a quick fix can go to this comment
That endpoint was deprecated. It’s not your python version. We’ll be working on implementing support for the new endpoints shortly.