- Mais recentes
- Mais votos
- Mais comentários
It seems like you're encountering a syntax error due to an indentation problem in your code. The error message you provided points to line 81, but it might be helpful to look at the code around that line to identify the issue.
From the code snippet you provided, I can identify two issues:
-
Indentation Error: The line mentioned in the error message appears to be part of a commented-out block. It's worth checking that the indentation levels are consistent throughout your code, especially in the function process_text_analysis.
-
Misplaced Comment Lines: It looks like there are some commented-out lines of code that are interfering with the actual code. You'll want to make sure that the commented-out lines are actually meant to be comments and are not interfering with the rest of the code.
Here's the part of the code that needs to be fixed:
### Uncomment to analyze a local file ###
# with open("pathToFile", 'rb') as img_file:
### To display image using PIL ###
# image = Image.open()
### Read bytes ###
# img_bytes = img_file.read()
response = client.analyze_document(Document={'Bytes': img_bytes}, FeatureTypes=["TABLES", "FORMS", "SIGNATURES"])
It seems like the comments are not properly aligned with the code, and the indentation of the last line is incorrect. If you meant to comment out the whole block, make sure to include the response line as well. If you meant to use this part of the code, make sure to fix the indentation and uncomment the necessary lines.
Here's a corrected version of the code block, assuming you want to comment it all out:
### Uncomment to analyze a local file ###
# with open("pathToFile", 'rb') as img_file:
### To display image using PIL ###
# image = Image.open()
### Read bytes ###
# img_bytes = img_file.read()
# response = client.analyze_document(Document={'Bytes': img_bytes}, FeatureTypes=["TABLES", "FORMS", "SIGNATURES"])
Please make these changes, and let me know if you encounter any further issues!
Conteúdo relevante
- AWS OFICIALAtualizada há um ano
- AWS OFICIALAtualizada há um ano
- AWS OFICIALAtualizada há um ano
- AWS OFICIALAtualizada há um ano