我在下面的代码中出于某种原因在行SyntaxError: invalid syntax
中收到错误except httplib.IncompleteRead, e:
。它的Python 3.4
:
import httplib
import xlrd
import urllib
try:
url = 'http://www.bankofcanada.ca/stats/results/xls'
#In case of http.client.IncompleteRead Error
except httplib.IncompleteRead, e:
spot_curve = e.partial
short_end_spot_curve = e.partial
答案 0 :(得分:1)
至少在Python3中它是:
except httplib.IncompleteRead as e: