[英]AWS textract - start expense analysis
While implementing aws textract Analyse Expense asynchronous api using boto3 for python, I'm getting error as在使用 boto3 为 python 实施 aws textract 分析费用异步 api 时,我收到错误消息
'Textract' object has no attribute 'start_expense_analysis'.
on the other hand, start_document_text_detection is working fine for me in the same environment.另一方面, start_document_text_detection 在相同的环境中对我来说工作正常。
Code:代码:
def startAnalyseJob(s3BucketName, objectName):
textract = boto3.client('textract')
response = textract.start_expense_analysis(
DocumentLocation={
'S3Object': {
'Bucket': s3BucketName,
'Name': objectName
}
})
return response["JobId"]
jobId = startAnalyseJob(bucket, key)
Error:错误:
[ERROR] AttributeError: 'Textract' object has no attribute 'start_expense_analysis'
This errors occur when attempting to call an AWS service or AWS API that requires the latest version of the SDK.尝试调用需要最新版本的 SDK 的 AWS 服务或 AWS API 时会发生此错误。 Try to upgrade your installation of Boto3 with the following commands:尝试使用以下命令升级您的 Boto3 安装:
pip install --upgrade botocore
pip install --upgrade boto3
Additional troubleshooting steps available here: https://aws.amazon.com/premiumsupport/knowledge-center/lambda-python-runtime-errors/此处提供其他故障排除步骤: https://aws.amazon.com/premiumsupport/knowledge-center/lambda-python-runtime-errors/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.