python - Google API and cx_Freeze not working properly -


i have made python program capable of uploading files google drive. .py file works , not give errors.

but i'm going distribute people not have python installed, must turn program , resources .exe. have done cx_freeze. have used before , has worked.

but now, google drive api seems causing errors when .exe run. here errors gives:

traceback (most recent call last): file "c:\python27\lib\runpy.py", line 162, in _run_module_as_main   "__main__", fname, loader, pkg_name)  file "c:\python27\lib\runpy.py", line 72, in _run_code   exec code in run_globals  file "test.py", line 41, in <module>  file "c:\python27\lib\oauth2client\util.py", line 128, in positional_wrapper   return wrapped(*args, **kwargs)  file "c:\python27\lib\oauth2client\client.py", line 1283, in step2_exchange   headers=headers)  file "c:\python27\lib\site-packages\httplib2-0.8-py2.7.egg\httplib2\__init__.p y", line 1570, in request   (response, content) = self._request(conn, authority, uri, request_uri, metho d, body, headers, redirections, cachekey)  file "c:\python27\lib\site-packages\httplib2-0.8-py2.7.egg\httplib2\__init__.p y", line 1317, in _request   (response, content) = self._conn_request(conn, request_uri, method, body, aders)  file "c:\python27\lib\site-packages\httplib2-0.8-py2.7.egg\httplib2\__init__.p y", line 1252, in _conn_request   conn.connect()  file "c:\python27\lib\site-packages\httplib2-0.8-py2.7.egg\httplib2\__init__.p y", line 1021, in connect   self.disable_ssl_certificate_validation, self.ca_certs)  file "c:\python27\lib\site-packages\httplib2-0.8-py2.7.egg\httplib2\__init__.p y", line 80, in _ssl_wrap_socket   cert_reqs=cert_reqs, ca_certs=ca_certs)  file "c:\python27\lib\ssl.py", line 383, in wrap_socket   ciphers=ciphers)  file "c:\python27\lib\ssl.py", line 141, in __init__   ciphers)  ssl.sslerror: [errno 185090050] _ssl.c:340: error:0b084002:x509 certificate rout ines:x509_load_cert_crl_file:system lib 

it gives error after user has typed in authorization code.

after debugging, found out line causing problem

credentials = flow.step2_exchange(code)

here snippet of code:

flow = oauth2webserverflow(client_id, client_secret, oauth_scope, redirect_uri) authorize_url = flow.step1_get_authorize_url() webbrowser.open(authorize_url) code = raw_input('enter verification code: ').strip() credentials = flow.step2_exchange(code) http = httplib2.http() http = credentials.authorize(http) drive_service = build('drive', 'v2', http=http) 

the client_id, client_secret, oauth_scope , redirect_uri configured correctly.

so, problem here?

if need see more code, ask , update question.

looks can't find ssl certificates. kind of understandable because httplib2 loads them file system, , nothing tells cx_freeze put them in bundled package.

read this, help: https://github.com/kennethreitz/requests/issues/557#issuecomment-6420819


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -