2014-11-06 43 views
1

我正在使用Simple Salesforce在Python中運行Salesforce數據庫查詢。它在開發環境中工作正常,但是當我使用py2exe編譯並在命令提示符下運行它時,出現一個我理解的可能與SSL有關的錯誤,但不知道如何解決它。我並沒有包括整個代碼,但11行錯誤稱爲是sf = Salesforce(username='myusername', password='mypassword', security_token='mytoken')Python錯誤,使用Python Simple-Salesforce exe

我試圖sf = Salesforce(username='myusername', password='mypassword', security_token='mytoken', verify=False)沒有運氣

我的代碼:

from simple_salesforce import Salesforce 
sf = Salesforce(username='myusername', password='mypassword', security_token='mytoken') 
data = sf.query_all(select id from Case) 

我的錯誤:

Traceback (most recent call last): 
    File "myfile.py", line 11, in <module> 
    File "simple_salesforce\api.pyc", line 74, in __init__ 
    File "simple_salesforce\login.pyc", line 116, in Salesforce login 
    File "requests\api.pyc", line 88, in post 
    File "requests\api.pyc", line 44, in request 
    File "requests\sessions.pyc", line 456, in request 
    File "requests\sessions.pyc", line 559, in send 
    File "requests\adapters.pyc", line 382, in send 
requests.exceptions.SSLError: [Errno 185090050] _ssl.c:344 erroroB084002:x509 
certificate routines:X509_load_cert_crl_file:system lib 

回答