需要有关Google视觉API的帮助

时间:2019-05-05 17:18:58

标签: exception google-cloud-platform ocr vision

我正在使用谷歌视觉api创建一个应用程序,以从一些图像文档中提取手写文本。我已经准备好了谷歌云,并使用代码将json文件保存在本地文件夹中。我使用谷歌云存储来创建存储桶,并将存储桶的名称传递给代码。我设法解决了一些错误(或者也许是我真的销毁了它?!),但是我仍然在命令行中收到这个巨大的错误:

是什么意思?我该怎么解决?

    Input directory path is valid
    Processing File .DS_Store ...
    Traceback (most recent call last):
    File "/Users/****j/anaconda3/lib/python3.7/site-packages/google     /api_core/grpc_helpers.py", line 57, in error_remapped_callable
    return callable_(*args, **kwargs)
    File "/Users/******j/anaconda3/lib/python3.7/site-packages     /grpc/_channel.py", line 562, in __call__
    return _end_unary_response_blocking(state, call, False, None)
    File "/Users/****j/anaconda3/lib/python3.7/site-packages                               /grpc/_channel.py", line 466, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
    grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.NOT_FOUND
details = "Error opening file: gs://ocad_images/001/.DS_Store."
debug_error_string =   "{"created":"@1557074238.415495000","description":"Error received from peer  ipv6:[2607:f8b0:400b:80f::200a]:443","file":"src/core/lib/surface /call.cc","file_line":1041,"grpc_message":"Error opening file: gs://buck_images/001/.DS_Store.","grpc_status":5}"

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
    File "input_ml.py", line 63, in <module>
    detect_hand_writtent_text(gcs_source_uri,gcs_destination_uri ,   os.path.abspath(data_dir)+"/output/"+input_file)
    File "/Users/*****j/Environments/GoogleCloud/handwriting/doc_txt_detect.py", line 36, in detect_hand_writtent_text
    requests=[async_request])
    File "/Users/*****j/anaconda3/lib/python3.7/site-packages/google/cloud/vision_v1/gapic/image_annotator_client.py", line 308, in  async_batch_annotate_files
    request, retry=retry, timeout=timeout, metadata=metadata
    File "/Users/******j/anaconda3/lib/python3.7/site-packages/google /api_core/gapic_v1/method.py", line 143, in __call__
    return wrapped_func(*args, **kwargs)
    File "/Users/****j/anaconda3/lib/python3.7/site-packages/google/api_core/retry.py", line 270, in retry_wrapped_func
    on_error=on_error,
    File "/Users/*****j/anaconda3/lib/python3.7/site-packages/google/api_core/retry.py", line 179, in retry_target
    return target()
    File "/Users/*****j/anaconda3/lib/python3.7/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
    File "/Users/****j/anaconda3/lib/python3.7/site-packages/google  /api_core/grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
    File "<string>", line 3, in raise_from
    google.api_core.exceptions.NotFound: 404 Error opening file:  gs://ocad_images/001/.DS_Store.

0 个答案:

没有答案