-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception in GRPC when trying to execute Google Cloud API #5774
Comments
@wcordeiro I'm not really familiar with pyinstaller. We have had a couple of reports of packaging-related issues with it:
In your case, it looks as though the SSL root certificates are not present in the pyinstaller-generated EXE. There are a couple of reports of similar problems, e.g. for
And this recipe: I don't think there is anytihng we can do in |
I'm not sure if this is the best solution for this problem but I just copied the roots.pem file located in site-packages/grpc/_cython/_credentials/ a = Analysis(
...
binaries=binaries,
datas=[
('roots.pem', 'grpc/_cython/_credentials/'),
], This will pack the pem file with the app, and it will find it right away. |
Thanks, this helped me a lot. |
I have the same issue, so, where to copy the file you mentioned? |
I copied to my main folder, together with my python code file, so the code above pack them in the folder 'grpc/_cython/_credentials/' in your generated pyinstaller dir. |
A PyInstaller hook called from PyInstaller.utils.hooks import collect_data_files
datas = collect_data_files('grpc') Will open a PR on the PyInstaller repo for that. |
Is this solution a security risk as pem files include certificates? |
@cbenhagen It did work. I have been trying for whole day today to convert my python code to .exe file.
|
Thanks very much @rising-stark and @cbenhagen for your help! In my case it was under |
@rising-stark Thanks! Worked for me :) 👍🏻 |
Thanks ! It Worked for me :) 👍🏻 |
@cbenhagen Hello, have you made the PR? This was 2018 I think you did :D would it be fine for you to post the PR link here? Thank you! |
@cbenhagen @rising-stark What a life saver both of you! THANK YOU! |
Thank you it's great 💯 @cbenhagen @rising-stark |
relates to common issue when packaging google cloud api via pyinstaller googleapis/google-cloud-python#5774 (comment)
Fixes to common issue when packaging google cloud api via pyinstaller googleapis/google-cloud-python#5774 (comment)
I am having a problem when I generate an exe file with pyinstaller. My code runs okay when I execute using the python interpreter but when I generate the exe file using the PyInstaller I get a GRPC error.
Error: Exception in 'grpc._cython.cygrpc.ssl_roots_override_callback' ignored E0807 20:38:36.262000000 10808 src/core/lib/security/security_connector/security_connector.cc:1173] assertion failed: pem_root_certs != nullptr
The error happen when I try to execute a long_running_recognize.
Any tips regarding this problem?
The text was updated successfully, but these errors were encountered: