0

I'm getting the error SyntaxError: invalid syntax in the line except httplib.IncompleteRead, e: for some reason in my code below. Its 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 
user131983
  • 3,787
  • 4
  • 27
  • 42

1 Answers1

1

At least in Python3 it is:

 except httplib.IncompleteRead as e: