You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importtweepyt=tweepy.Tweet(data={'edit_history_tweet_ids': ['16213149247090909'],
'id': '16213149247090909',
'text': "We're super excited to not only welcome the Flamingo Janes in..."})
importpicklepickled_tweet=pickle.dumps(t)
pickle.loads(pickled_tweet)
fails with a recursion error and is related to bug #1792 .
(Why not using the data attribute to serialise the object? Initially I wasn't sure whether data contains actually the full state of the object... would be great to clarify in the docs.)
---------------------------------------------------------------------------
RecursionError Traceback (most recent call last)
Cell In[3], line 3
1 import pickle
2 pickled_tweet = pickle.dumps(t)
----> 3 pickle.loads(pickled_tweet)
File /usr/local/Caskroom/miniforge/base/envs/wellington-on-a-good-day/lib/python3.11/site-packages/tweepy/mixins.py:33, in DataMapping.__getattr__(self, name)
31 def __getattr__(self, name):
32 try:
---> 33 return self.data[name]
34 except KeyError:
35 raise AttributeError from None
File /usr/local/Caskroom/miniforge/base/envs/wellington-on-a-good-day/lib/python3.11/site-packages/tweepy/mixins.py:33, in DataMapping.__getattr__(self, name)
31 def __getattr__(self, name):
32 try:
---> 33 return self.data[name]
34 except KeyError:
35 raise AttributeError from None
[... skipping similar frames: DataMapping.__getattr__ at line 33 (2970 times)]
File /usr/local/Caskroom/miniforge/base/envs/wellington-on-a-good-day/lib/python3.11/site-packages/tweepy/mixins.py:33, in DataMapping.__getattr__(self, name)
31 def __getattr__(self, name):
32 try:
---> 33 return self.data[name]
34 except KeyError:
35 raise AttributeError from None
RecursionError: maximum recursion depth exceeded
The code (python 3.11 and tweepy 4.12.1):
fails with a recursion error and is related to bug #1792 .
(Why not using the
data
attribute to serialise the object? Initially I wasn't sure whetherdata
contains actually the full state of the object... would be great to clarify in the docs.)Reading https://docs.python.org/3/library/pickle.html#pickling-class-instances, I can re-create this by using
The text was updated successfully, but these errors were encountered: