Python running on spyder 2.2.5 -
i new python , trying run attached code.
import urllib url = 'https://www.google.com/' print(url) sock = urllib.urlopen(url)
but error below:
>>> runfile('c:/users/myname/documents/python scripts/ex00.py', wdir=r'c:/users/myname/documents/python scripts') https://www.google.com/ traceback (most recent call last): file "<stdin>", line 1, in <module> file "c:\users\myname\appdata\local\continuum\anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile execfile(filename, namespace) file "c:/users/myname/documents/python scripts/ex00.py", line 5, in <module> sock = urllib.urlopen(url) file "c:\users\myname\appdata\local\continuum\anaconda\lib\urllib.py", line 87, in urlopen return opener.open(url) file "c:\users\myname\appdata\local\continuum\anaconda\lib\urllib.py", line 208, in open return getattr(self, name)(url) file "c:\users\myname\appdata\local\continuum\anaconda\lib\urllib.py", line 437, in open_https h.endheaders(data) file "c:\users\myname\appdata\local\continuum\anaconda\lib\httplib.py", line 969, in endheaders self._send_output(message_body) file "c:\users\myname\appdata\local\continuum\anaconda\lib\httplib.py", line 829, in _send_output self.send(msg) file "c:\users\myname\appdata\local\continuum\anaconda\lib\httplib.py", line 791, in send self.connect() file "c:\users\myname\appdata\local\continuum\anaconda\lib\httplib.py", line 1172, in connect self.timeout, self.source_address) file "c:\users\myname\appdata\local\continuum\anaconda\lib\socket.py", line 571, in create_connection raise err ioerror: [errno socket error] [errno 10060] connection attempt failed because connected party did not respond after period of time, or established connection failed because connected host has failed respond
earlier thought may because running script office , vpn causing issues. ran home internet connection no resolution :(
Comments
Post a Comment