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?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠