Python3程序执行失败,出现错误:';socket.gaierro:[Errno-2]名称或服务未知';

Python3程序执行失败,出现错误:';socket.gaierro:[Errno-2]名称或服务未知';,python,urllib3,Python,Urllib3,我正在使用PythonVirtualenv运行一个python3程序。 我支持代理,在执行以下程序之前已导出http\U代理/https\U代理。仍然遇到问题。请建议 (geo_env)root@xyz-ntp-154:~/geo_env# cat search1.py #!/usr/bin/env python3 from pygeocoder import Geocoder if __name__ == '__main__': address = '207 N. Defiance

我正在使用PythonVirtualenv运行一个python3程序。 我支持代理,在执行以下程序之前已导出http\U代理/https\U代理。仍然遇到问题。请建议

(geo_env)root@xyz-ntp-154:~/geo_env# cat search1.py
#!/usr/bin/env python3

from pygeocoder import Geocoder

if __name__ == '__main__':
    address = '207 N. Defiance St, Archbold, OH'
    print(Geocoder.geocode(address)[0].coordinates)
以下是错误:

(geo_env)root@xyz-ntp-154:~/geo_env# python3 search1.py
Traceback (most recent call last):
File "/root/geo_env/lib/python3.4/site-    packages/requests/packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/root/geo_env/lib/python3.4/site-  packages/requests/packages/urllib3/util/connection.py", line 67, in create_connection
for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
File "/usr/lib/python3.4/socket.py", line 533, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

你能在没有地理编码器的情况下发出普通http请求吗?你能在没有地理编码器的情况下发出普通http请求吗?