【问题标题】:Form Recognizer API Analyze Layout Results in Error InvalidImageURL "Image URL is badly formatted."表单识别器 API 分析布局导致错误 InvalidImageURL“图像 URL 格式错误”。
【发布时间】:2020-04-18 20:08:05
【问题描述】:
【问题讨论】:
标签:
azure-cognitive-services
【解决方案1】:
此“InvalidImageURL”错误代码可能具有误导性。这可能意味着图像不可访问。调用 API 的另一种选择是使用二进制数据,它使用 Content-Type:application/pdf、image/jpeg、image/png、或 image/tiff,而不是使用 Content-Type: application/json,后者使用图像 URL。
如果有助于澄清,请参阅我的帖子 here。
集成电路
【解决方案2】:
我遇到了同样的问题,并且能够通过序列化正文有效负载中的对象来解决它。在python中...
body = { "source": "https://...." }
resp = post(url = post_url, data = json.dumps(body), headers = headers, params = params)