Traceback (most recent call last):
File "/home/ubuntu/anaconda3/lib/python3.6/urllib/request.py", line 1349, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/home/ubuntu/anaconda3/lib/python3.6/http/client.py", line 1272, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/home/ubuntu/anaconda3/lib/python3.6/http/client.py", line 1318, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/home/ubuntu/anaconda3/lib/python3.6/http/client.py", line 1267, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/ubuntu/anaconda3/lib/python3.6/http/client.py", line 1038, in _send_output
self.send(msg)
File "/home/ubuntu/anaconda3/lib/python3.6/http/client.py", line 976, in send
self.connect()
File "/home/ubuntu/anaconda3/lib/python3.6/http/client.py", line 948, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/home/ubuntu/anaconda3/lib/python3.6/socket.py", line 704, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/home/ubuntu/anaconda3/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/www/html/ca_backend/python/get_t.py", line 25, in
print_temp(station)
File "/var/www/html/ca_backend/python/get_t.py", line 9, in print_temp
xml = urllib.request.urlopen(st_url)
File "/home/ubuntu/anaconda3/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/home/ubuntu/anaconda3/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/home/ubuntu/anaconda3/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/home/ubuntu/anaconda3/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/home/ubuntu/anaconda3/lib/python3.6/urllib/request.py", line 1377, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/home/ubuntu/anaconda3/lib/python3.6/urllib/request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: