Export DataObject - Failed precondition · Issue #17579 · googleapis/google-cloud-python · GitHub
Skip to content

Export DataObject - Failed precondition #17579

Description

@Tharun-PS

Determine this is the right repository

  • I determined this is the correct repository in which to report this bug.

Summary of the issue

Context
I'm trying to export my collection to a new collection.
So I referred vector_search_service_client.export_data_objects() method mentioned in https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/data-objects/data-objects#export_data_objects

This is my code:

from google.cloud import vectorsearch

# Create the client
vector_search_service_client = vectorsearch.VectorSearchServiceClient()

# Initialize request
request = vectorsearch.ExportDataObjectsRequest(
    name=f"projects/{PROJECT_ID}/locations/{LOCATION}/collections/{COLLECTION_ID}",
    gcs_destination={
        "export_uri": "gs://my-bucket/pipeline_logs/collection_export/",
        "format": vectorsearch.ExportDataObjectsRequest.GcsExportDestination.Format.JSONL,
    },
)

# Make the request
operation = vector_search_service_client.export_data_objects(request=request)

# Wait for the result (note this may take up to several minutes)
operation.result()

Expected Behavior:
It should export the data object and vector object to google cloud storage path mentioned.

Actual Behavior:
Instead it is returning the following error despite my folder is empty

FailedPrecondition: 400 Invalid resource state for "gs://my-bucket/pipeline_logs/collection_export/": gcs_destination.export_uri must be empty, but found objects 9: Invalid resource state for "gs://my-bucket/pipeline_logs/collection_export/": gcs_destination.export_uri must be empty, but found object

API client name and version

google-cloud-vectorsearch v0.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions