From 5006342f17029acc7335eebc83316f0949df2c69 Mon Sep 17 00:00:00 2001 From: Nik Nyby Date: Tue, 14 Nov 2017 14:48:32 -0500 Subject: [PATCH] TweepError log: fix AttributeError This change fixes this error: ``` Traceback (most recent call last): File "bot.py", line 84, in tweet(tweet_text) File "bot.py", line 67, in tweet log(e.message) AttributeError: 'TweepError' object has no attribute 'message' ``` I guess the error is a little different with recent versions of tweepy. I'm using 3.5.0. --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index f9fcd07..13e51a6 100644 --- a/bot.py +++ b/bot.py @@ -49,7 +49,7 @@ def tweet(text): try: api.update_status(text) except tweepy.error.TweepError as e: - log(e.message) + log(str(e)) else: log("Tweeted: " + text) @@ -64,4 +64,4 @@ def log(message): if __name__ == "__main__": tweet_text = create_tweet() - tweet(tweet_text) \ No newline at end of file + tweet(tweet_text)