嘿,我正在使用python腳本來測試web商務網站上的功能。我把這個劇本上pythonanywhere現場,有時就像7天連續沒有問題,但有天,像這樣的,當我得到這個錯誤:Python腳本奇怪的問題
Logged in with test_cart
Open http://[***]/electronics/page/1
Search ... iphone
[****************]
File "/home/.../cart-pickup.py", line 58, in alo
site = opener.open(url)
File "/usr/local/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/usr/local/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/usr/local/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/local/lib/python2.7/urllib2.py", line 1180, in do_open
r = h.getresponse(buffering=True)
File "/usr/local/lib/python2.7/httplib.py", line 1030, in getresponse
response.begin()
File "/usr/local/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python2.7/httplib.py", line 371, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine: ''
>>>
任何想法可能是什麼? 在此先感謝
我不認爲這是你的Python腳本一個問題,而是一個與問題它試圖與之交談的Web服務器。 – 2012-08-11 10:41:13