在Quickstart: Train a Form Recognizer model and extract form data by using the REST API with cURL的第一步之后,当我尝试训练6个发票的Form Recognizer模型时,会收到错误1002,该模型先前已上传到Azure Blob容器。
执行了卷曲命令行:
curl -i -X POST "https://<MYENDPOINT>/formrecognizer/v2.0-preview/custom/models" -H "Content-Type: application/json" -H "Ocp-Apim-Subscription-Key: <MYSUSCRIPTIONKEY>" --data-ascii "{ \"source\": \""<SAS BLOB URL>"\"}"
这是输出:
[1] 36524
[2] 36525
[3] 36526
[4] 36527
[5] 36528
[2] Done st=2020-05-01T17:25:12Z
[3] Done se=2020-05-02T17:25:12Z
[4]- Done sv=2019-10-10
[5]+ Done sr=c
Alexx-MacBook-Pro:~ alexlarsten$ HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
x-envoy-upstream-service-time: 2
apim-request-id: aa7c2ec4-ad84-4c45-86d4-bb59f573286c
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Sat, 02 May 2020 10:13:47 GMT
{"error":{"code":"1002","message":"Train request is either invalid or missing required parameters. Please reference the API reference and retry your request."}}
API文档中未定义错误1002。我已将从Internet获得的不同收据和发票以JPG和其他图像格式上传到Blob容器,但是始终有相同的错误。
谢谢,伙计们!