python - py2exe googlemaps.exceptions.TransportError 'x509 certificate routines' -


i have program works fine before putting through py2exe process. 1 of packages used googlemaps geolocation. after turning program .exe file using py2exe run .exe file , following traceback error:

traceback (most recent call last):   ...     file "googlemaps\client.pyc", line 356, in wrapper   file "googlemaps\geocoding.pyc", line 68, in geocode   file "googlemaps\client.pyc", line 233, in _request googlemaps.exceptions.transporterror: [('system library', 'fopen', 'no such proc ess'), ('bio routines', 'bio_new_file', 'no such file'), ('x509 certificate rout ines', 'x509_load_cert_crl_file', 'system lib')] 

i ran similar issues requests module when using py2exe. resolve issue, needed explicitly state path of ca_bundle using verify parameter per documentation here. had include cacert.pem file in files bundled program in setup.py file py2exe uses.

setup(console=['program.py'],       data_files=[('requests_cert',                     ['c:\users\xxxx\anaconda2\lib\site-packages\requests\cacert.pem'])]      ) 

i've done enough digging in googlemaps.client python code know it's using same requests package. have tried pass ca_bundle googlemaps dictionary follows.

address = '1600 pennsylvania ave nw, washington, dc 20500' gmaps = googlemaps.client(key=api_key,                            requests_kwargs={'verify': ca_bundle}) result = gmaps.geocode(address) 

this code runs fine without py2exe, crashes, traceback shared above, on result line of code after turn .exe file.

has experienced before? how should resolve issue py2exe program works?

edit/update:

i did little more digging , post related.

how make googlemaps python library detect ssl certificates?

through of post they're checking location of certificate using certifi python package. issue potentially certificate (.pem file) i'm moving .exe file folders? current .pem file i'm using works requests module, not seem work googlemaps package.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -