From: le d. <le....@la...> - 2015-06-29 09:25:19
|
Le 27/06/2015 00:00, Toni Barth a écrit : > Am 26.06.2015 um 22:48 schrieb Toni Barth: >> Hello py2exe users, >> >> i'm currently encountering the following problem, using python 2.7.10 >> and the newest httplib2, doing some youtube api research using the >> google-api-python-client library. >> Loading a httplib2.Http() object, I run into the following problem (of >> course just compiled with py2exe, not running as source code): >> >> ... >> File "oauth2client\util.pyo", line 137, in positional_wrapper >> File "oauth2client\client.pyo", line 1982, in step2_exchange >> File "httplib2\__init__.pyo", line 1608, in request >> File "httplib2\__init__.pyo", line 1350, in _request >> File "httplib2\__init__.pyo", line 1272, in _conn_request >> File "httplib2\__init__.pyo", line 1036, in connect >> File "httplib2\__init__.pyo", line 80, in _ssl_wrap_socket >> File "ssl.pyo", line 911, in wrap_socket >> File "ssl.pyo", line 520, in __init__ >> IOError: [Errno 2] No such file or directory >> >> At first I thought it would be the httplib2 certs which are missing, >> so I included them manually and gave the Http() call the location of >> the new file, but this didn't help. The ssl.py bundled with python >> itself does the buggy thing. Is there a way to include whatever python >> itself needs (I don't know what) manually or can that be patched into >> py2exe itself to prevent these errors in the future? >> >> Thanks for your answers. >> >> Best Regards. >> >> Toni Barth >> > Problem found. > Delivering the C:\python27\lib\site-packages\httplib2\cacerts.txt within > the program bundle and then creating the Http() instance by giving > ca_certs=path_to_cacerts_txt works just fine. It's just bothering that > you'll have to pack and move around the file on your own, it takes time > to read into the package, even if you just need to create the Http() > instance without any knowledge about it, as you'll probably do if you're > using the google-python-api-client. > Anyway, thanks for reading. > Thank you for feeding back :-) |