1

基本的にhttps://developers.google.com/drive/quickstart-pythonのコードと同じで、最初の試行のたびに同じエラーが発生します:

# Traceback (most recent call last):
#   File "C:/plug-ins/googleDrive.py", line 35, in <lambda>
#     self.authAction = self.menu.addAction( 'Authentication', lambda: self.runAuthentication()  )
#   File "C:/plug-ins/googleDrive.py", line 46, in runAuthentication
#     credentials = self.flow.step2_exchange( unicode(text) )
#   File "D:/Python\oauth2client\util.py", line 120, in positional_wrapper
#     return wrapped(*args, **kwargs)
#   File "D:/Python\oauth2client\client.py", line 1131, in step2_exchange
#     headers=headers)
#   File "D:/Python\httplib2\__init__.py", line 1597, in request
#     (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
#   File "D:/Python\httplib2\__init__.py", line 1345, in _request
#     (response, content) = self._conn_request(conn, request_uri, method, body, headers)
#   File "D:/Python\httplib2\__init__.py", line 1281, in _conn_request
#     conn.connect()
#   File "D:/Python\httplib2\__init__.py", line 1013, in connect
#     self.disable_ssl_certificate_validation, self.ca_certs)
#   File "D:/Python\httplib2\__init__.py", line 80, in _ssl_wrap_socket
#     cert_reqs=cert_reqs, ca_certs=ca_certs)
#   File "C:\python26\ssl.py", line 350, in wrap_socket
#   File "C:\python26\ssl.py", line 118, in __init__
#   File "C:\python26\ssl.py", line 293, in do_handshake
# ssl.SSLError: [Errno 8] _ssl.c:480: EOF occurred in violation of protocol

これを Python 2.6.4、httplib2 v0.7.7、および google-api-python-client v1.0b9 で実行します。誰かがアイデアを持っていれば...私はとても感謝しています。

4

1 に答える 1

1

そのバージョンのgoogle-api-python-client(v1.0b9)はクライアントライブラリのベータ9であるため、リリースバージョン(単にv1.0)にアップグレードする必要があります。

「EOFがプロトコルに違反して発生した」については、不安定なネットワーク接続でのみ発生するのを見たことがありますが、それはここに当てはまりますか?

于 2012-11-22T03:17:16.533 に答える