我提出地址解析請求使用要求網上搜尋API:的Python:要求谷歌地圖API - 握手問題
geo_url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' + geo_address + '&key=' + GOOGLE_API_KEY
geo_response = requests.get(url=geo_url, verify=False)
geo = geo_response.json()
在我CLOUD9 IDE它的工作原理semalessly。
在我的Ubuntu服務器與Apache和mod_wsgi的它工作的時候,但是經常失敗,並在阿帕奇error.log中的錯誤:
File "/var/virtualenv/primo/lib/python2.7/site-packages/django/utils/log.py", line 129, in emit
self.send_mail(subject, message, fail_silently=True, html_message=html_message)
File "/var/virtualenv/primo/lib/python2.7/site-packages/django/utils/log.py", line 132, in send_mail
mail.mail_admins(subject, message, *args, connection=self.connection(), **kwargs)
File "/var/virtualenv/primo/lib/python2.7/site-packages/django/core/mail/__init__.py", line 98, in mail_admins
mail.send(fail_silently=fail_silently)
File "/var/virtualenv/primo/lib/python2.7/site-packages/django/core/mail/message.py", line 303, in send
return self.get_connection(fail_silently).send_messages([self])
File "/var/virtualenv/primo/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 100, in send_messages
new_conn_created = self.open()
File "/var/virtualenv/primo/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 64, in open
self.connection.starttls(keyfile=self.ssl_keyfile, certfile=self.ssl_certfile)
File "/usr/lib/python2.7/smtplib.py", line 649, in starttls
self.sock = ssl.wrap_socket(self.sock, keyfile, certfile)
File "/usr/lib/python2.7/ssl.py", line 487, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python2.7/ssl.py", line 243, in __init__
self.do_handshake()
File "/usr/lib/python2.7/ssl.py", line 405, in do_handshake
self._sslobj.do_handshake()
error: [Errno 0] Error
我不明白什麼錯誤。請有人指出我正確的方向嗎?
您使用的是什麼版本的請求? –
請求== 2.5.3 – caliph
現在最新版本是2.9.1,請嘗試升級並查看問題是否仍然存在 –