Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
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

Closed

Description

@yoland68

Environment details

  • OS type and version: macOS Big Sur 11.2.3
  • Python version: Python 3.10.1
  • pip version: pip 22.0.4
  • google-cloud-storage version: 2.9.0

Steps to reproduce

  1. Call transfer_manager.upload_many_from_files() function with worker type as "process".
  2. This generates an error when it tries to pickle a blob file.

Code example

from google.cloud.storage import transfer_manager
# assuming bucket, client and filepaths have been defined

transfer_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

The file itself is a mp4 video

Activity

  1. added
    api: storage
    on May 18, 2023
  2. andrewsg commented on May 18, 2023

    @andrewsg
    Contributor

    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?

  3. yoland68 commented on May 18, 2023

    @yoland68
    Author

    Thank you! I am on 2.9, sorry got lazy and asked Bard to write the report for me, which hallucinated some info

  4. andrewsg commented on May 18, 2023

    @andrewsg
    Contributor

    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?

  5. andrewsg commented on May 22, 2023

    @andrewsg
    Contributor

    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?

  6. self-assigned this
    on May 23, 2023
  7. andrewsg commented on Aug 23, 2023

    @andrewsg
    Contributor

    @yoland68 Any updates on this?

  8. realech commented on Sep 4, 2023

    @realech

    Hello @andrewsg! I am still experiencing this issue:

    OS type and version: Ubuntu 22.04.2 LTS
    Python version: Python 3.10.12
    pip version: pip 23.2.1
    google-cloud-storage version: 2.10.0

    If I call:

    import cryptography
    print(cryptography.__version__)

    It says 3.4.8

    I load the credentials using a JSON file, and it happens when calling transfer_manager.download_many_to_path

  9. andrewsg commented on Sep 18, 2023

    @andrewsg
    Contributor

    @realech Thanks, I'll look into this, following along on bug #1116 with new info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: storage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions