2014-12-01 45 views
0

我正嘗試使用Google Admin SDK API和Python客戶端庫管理我的Google Apps用戶。我想獲得一定的用戶,bssl.SSLError:[錯誤1] _ssl.c:1429:Google Admin SDK客戶端庫生成SSL3_GET_RECRD:嘗試獲取用戶時出現錯誤的版本號錯誤

error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number 

我的代碼(主要)如下:

import httplib2 
from apiclient import errors 
from apiclient.discovery import build 

client_email = '[email protected]' 
with open("service_account_certificate.p12") as f: 
    private_key = f.read() 
OAUTH_SCOPE = 'https://www.googleapis.com/auth/admin.directory.user' 
credentials = SignedJwtAssertionCredentials(client_email, private_key, OAUTH_SCOPE, sub="[email protected]") 
http = httplib2.Http() 
http = credentials.authorize(http) 

directory_service = build('admin', 'directory_v1', http=http) 

user = directory_service.users().get(userKey="[email protected]").execute() 

最後一行似乎成爲造成問題的原因之一。任何提示?

E.

回答

1

SSL routines:SSL3_GET_RECORD:wrong version number

服務器不再支持的SSLv3。您需要升級您的pip模塊和/或Python。

相關問題