You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Transfer manager API failure when using process as worker type #1044
Call transfer_manager.upload_many_from_files() function with worker type as "process".
This generates an error when it tries to pickle a blob file.
Code example
fromgoogle.cloud.storageimporttransfer_manager# assuming bucket, client and filepaths have been definedtransfer_manager.upload_many_from_files(bucket, client, filepaths, process=8)
Stack trace:
File "/Users/x/opt/anaconda3/envs/drip-backend/lib/python3.10/site-packages/google/cloud/storage/transfer_manager.py", line 910, in _pickle_blob
p.dump(blob)
TypeError: cannot pickle '_cffi_backend.FFI' object
This is an error that seems to crop up if the user has the cryptography package installed in their environment. It should have been fixed by #1016.
Your error says that your google-cloud-storage version is 4.5.0 but the latest version is 2.9.0. Can you double-check you have the 2.9.0 version installed?
Hi, why did you close this as completed? You said you were already on 2.9.0; doesn't that imply the issue persists with the current version, contrary to our expectations?
Okay, thanks for reopening. I'm surprised you're still encountering this error on 2.9.0 and would like to investigate. If there is nothing private in it, can you share the line of code where you create your Client object in its entirety, and any lines you feel are closely related? Please redact any personally identifiable information. If you'd rather not post it here, you can email me at gorcester@google.com as well.
If you are just creating a default client with Client(), then please tell me a bit more about how you are authenticating (JSON file for service account key via GOOGLE_APPLICATION_CREDENTIALS env variable for instance?)
Also, do you have the package cryptography installed in this environment? If so, what version?
Activity
andrewsg commentedon May 18, 2023
This is an error that seems to crop up if the user has the
cryptographypackage installed in their environment. It should have been fixed by #1016.Your error says that your google-cloud-storage version is 4.5.0 but the latest version is 2.9.0. Can you double-check you have the 2.9.0 version installed?
yoland68 commentedon May 18, 2023
Thank you! I am on 2.9, sorry got lazy and asked Bard to write the report for me, which hallucinated some info
andrewsg commentedon May 18, 2023
Hi, why did you close this as completed? You said you were already on 2.9.0; doesn't that imply the issue persists with the current version, contrary to our expectations?
andrewsg commentedon May 22, 2023
Okay, thanks for reopening. I'm surprised you're still encountering this error on 2.9.0 and would like to investigate. If there is nothing private in it, can you share the line of code where you create your Client object in its entirety, and any lines you feel are closely related? Please redact any personally identifiable information. If you'd rather not post it here, you can email me at gorcester@google.com as well.
If you are just creating a default client with Client(), then please tell me a bit more about how you are authenticating (JSON file for service account key via GOOGLE_APPLICATION_CREDENTIALS env variable for instance?)
Also, do you have the package
cryptographyinstalled in this environment? If so, what version?andrewsg commentedon Aug 23, 2023
@yoland68 Any updates on this?
realech commentedon Sep 4, 2023
Hello @andrewsg! I am still experiencing this issue:
OS type and version:
Ubuntu 22.04.2 LTSPython version:
Python 3.10.12pip version:
pip 23.2.1google-cloud-storage version:
2.10.0If I call:
It says 3.4.8
I load the credentials using a JSON file, and it happens when calling transfer_manager.download_many_to_path
andrewsg commentedon Sep 18, 2023
@realech Thanks, I'll look into this, following along on bug #1116 with new info.