小编Dyl*_*007的帖子

tweepy错误python 2.7

我一直收到这个错误:

tweepy.error.TweepError: [{u'message': u'Status is a duplicate.', u'code': 187
Run Code Online (Sandbox Code Playgroud)

我不知道为什么我得到这个错误我已经尝试了一切!

我的主要代码是:

import socket
from urllib2 import urlopen, URLError, HTTPError

socket.setdefaulttimeout( 23 )  # timeout in seconds

url = 'http://google.co.uk'
try :
    response = urlopen( url )
except HTTPError, e:
    tweet_text = "Raspberry Pi Server is DOWN!"
    textfile = open('/root/Documents/server_check.txt','w')
    textfile.write("down")
    textfile.close()
except URLError, e:
    tweet_text = "Raspberry Pi Server is DOWN!"
    textfile = open('/root/Documents/server_check.txt','w')
    textfile.write("down")
    textfile.close()
else :
    textfile = open('/root/Documents/server_check.txt','r')
    if 'down' in open('/root/Documents/server_check.txt').read():
        tweet_text = "Raspberry Pi Server …
Run Code Online (Sandbox Code Playgroud)

python tweepy python-2.7

2
推荐指数
1
解决办法
2243
查看次数

标签 统计

python ×1

python-2.7 ×1

tweepy ×1