Unable to include a QUERY in either analyze_document or start_document_analysis

2

I am trying to send a query with the function analyze_document (or start_document_analysis) as described in the docs , however I get the error: Unknown parameter in input: "QueriesConfig", must be one of: Document, FeatureTypes, HumanLoopConfig

If I then remove "QueriesConfig", I get the error : An error occurred (InvalidParameterException) when calling the AnalyzeDocument operation: QueriesConfig must be used with QUERIES FeatureType.

I do not know hence what to do. I leave the full script code.

    client = boto3.client('textract')
    
    image_binary = stream.getvalue()
    response = client.analyze_document(Document={'Bytes': image_binary},
        FeatureTypes=["QUERIES"], 
        QueriesConfig={ 'Queries': [ { 'Text': 'what is the document date?' } ] })

Thanks!

質問済み 2年前850ビュー
1回答
0

Hello,

Thank you for trying Amazon Textract. It looks like you are using an older version of SDK. Can you please check if you have the latest version of SDK? If not, please update it and then try to run the script again and let us know if you are still seeing the first exception.

Thanks.

回答済み 2年前
  • I had the same issue and tried out with latest sdk. Still getting the same error. Boto3 version 1.23.1.

  • The SDK version is not the problem. I have the same issue with the newest version boto3 1.24.34, also i saw another similar question with the similar response which is not the solution also. Are you going to solve this issue soon or not ?

  • I have the same issue with boto3 version 1.24.34, thus, this is not the issue. In my case Forms works, but Queries not. Could you help us to solve this issue?

  • this seems to still be an issue. Any fix coming?

  • I have exactly the same problem as the poster, using the latest version of the PHP SDK. Are there any updates?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ