Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit 6eaad9a

Browse filesBrowse files
agnelvishalandrewferlitsch
authored andcommitted
1) I got argument parse error when bucket_name=bucket_name is given 2)blob_list[0] gave me folder name
1 parent bee6538 commit 6eaad9a
Copy full SHA for 6eaad9a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎samples/snippets/detect/detect.py‎

Copy file name to clipboardExpand all lines: samples/snippets/detect/detect.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ def async_detect_document(gcs_source_uri, gcs_destination_uri):
704704
bucket_name = match.group(1)
705705
prefix = match.group(2)
706706

707-
bucket = storage_client.get_bucket(bucket_name=bucket_name)
707+
bucket = storage_client.get_bucket(bucket_name)
708708

709709
# List objects with the given prefix.
710710
blob_list = list(bucket.list_blobs(prefix=prefix))
@@ -715,7 +715,7 @@ def async_detect_document(gcs_source_uri, gcs_destination_uri):
715715
# Process the first output file from GCS.
716716
# Since we specified batch_size=2, the first response contains
717717
# the first two pages of the input file.
718-
output = blob_list[0]
718+
output = blob_list[1]
719719

720720
json_string = output.download_as_string()
721721
response = json_format.Parse(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.