Apr-12-2019, 05:07 PM
I am a relatively newbie, dealing with python 2.7 code that needs to go to python 3.6 or 3.7
In the code I have 'import httplib' that I dutifully changed to 'import http.client as httplib'
Later in the code I have:
class whateverHTTPS(httplib.HTTP):
To that I get the error:
AttributeError: module 'http.client' has no attribute 'HTTP'
I searched the online documentation for httplib and indeed did not find HTTP
Attempted to change the code to:
class whateverHTTPS(httpclient.HTTP):
produces the error:
NameError: name 'http' is not defined
can somebody please shed light on my mistake
Thanks
ZA
In the code I have 'import httplib' that I dutifully changed to 'import http.client as httplib'
Later in the code I have:
class whateverHTTPS(httplib.HTTP):
To that I get the error:
AttributeError: module 'http.client' has no attribute 'HTTP'
I searched the online documentation for httplib and indeed did not find HTTP
Attempted to change the code to:
class whateverHTTPS(httpclient.HTTP):
produces the error:
NameError: name 'http' is not defined
can somebody please shed light on my mistake
Thanks
ZA