Python地理编码器不工作

时间:2015-11-26 13:19:45

标签: python django geocoding connectionexception

我正在尝试访问用户在我的Django App中输入的地址的地理位置。

该应用程序与pygeocoder正常工作。突然,该应用程序开始出现问题。

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ishaan/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pygeocoder.py", line 129, in geocode
    return GeocoderResult(Geocoder.get_data(params=params))
  File "/home/ishaan/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pygeocoder.py", line 204, in get_data
    response = session.send(request.prepare())
  File "/home/ishaan/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/home/ishaan/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/requests/adapters.py", line 370, in send
    timeout=timeout
  File "/home/ishaan/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
    body=body, headers=headers)
  File "/home/ishaan/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 344, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
  File "/home/ishaan/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 314, in _raise_timeout
    if 'timed out' in str(err) or 'did not complete (read)' in str(err):  # Python 2.6
TypeError: __str__ returned non-string (type Error)

我无法解决这个问题,并且对SSL及其错误几乎一无所知。

我不知道,它有多相关,但应用程序正在运行,直到我在同一个项目中为另一个应用程序安装Redis Server。我已经卸载了它,但它仍然无法正常工作。

最后,没有其他地理编码器正在工作 - 每个地理编码器都会出现同样的错误。我尝试使用GeoPy,地理编码器1.6.4

提前致谢

0 个答案:

没有答案