【问题标题】:FileNotFoundError: [Errno 2] No such file or directory Azure Python errorFileNotFoundError: [Errno 2] No such file or directory Azure Python 错误
【发布时间】:2020-09-08 11:54:25
【问题描述】:

我正在尝试按照以下方式进行标注:https://docs.microsoft.com/en-us/azure/cognitive-services/form-recognizer/quickstarts/python-receipts?tabs=v2-0

我将源定义为:

source = r"https://ocrstoragebeta.blob.core.windows.net/files1/download_token=0991878f8063e-1e5e-4859-`enter code here`9505-2d2fd6f097f945969-00P4J000000qXMlUAM (1).png"

并不断看到以下错误:

FileNotFoundError: [Errno 2] No such file or directory: 'https://ocrstoragebeta.blob.core.windows.net/files1/download_token=0991878f8063e-1e5e-4859-9505-2d2fd6f097f945969-00P4J000000qXMlUAM (1).png'

我将文件托管在 blob 存储中。这里出了什么问题?

【问题讨论】:

    标签: python azure


    【解决方案1】:

    恐怕你只能使用文档描述的本地路径:

    <path to your receipt> 替换为本地表单文档的路径。

    如果要使用存储在 azure 文件共享中的文件,应先将其连接到本地计算机并确保路径正确。

    【讨论】:

    • 如果我的回答对您有帮助,请接受作为回答,这可能对其他人有益。 @Barnik Bhattacharyya
    【解决方案2】:

    表单识别器可以接受一个 URL 作为输入文档。

    如果您打算使用 REST API,请放弃此答案,但我想指出,有一个 SDK here 和一个 sample 演示如何使用 URL 分析收据。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-03-29
      • 1970-01-01
      • 2022-01-24
      • 2019-03-25
      • 1970-01-01
      • 1970-01-01
      • 2018-03-07
      相关资源
      最近更新 更多