Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'DocumentAnalysisClient' from 'azure.ai.formrecognizer' #21766

Closed
DFMERA opened this issue Nov 15, 2021 · 5 comments
Assignees
Labels
Cognitive - Form Recognizer customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@DFMERA
Copy link

DFMERA commented Nov 15, 2021

  • azure.ai.formrecognizer:
  • 3.1.2:
  • Windows 10:
  • 3.9:

Describe the bug
Hi. I'm trying to run this example:
https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_invoices.py
But I keep getting this error:
ImportError: cannot import name 'DocumentAnalysisClient' from 'azure.ai.formrecognizer'
even after I installed and reinstalled the azure.ai.formrecognizer package several times

To Reproduce
Just download the file, replace the endpoint and the key and try to run the example:
https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_invoices.py

Expected behavior
Not getting an error when I try to run the example.

Screenshots
Error python formrecognizer

Additional context
Thank you very much for your help!!!

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 15, 2021
@kristapratico
Copy link
Member

Hi @DFMERA, DocumentAnalysisClient is only available in the recent beta release of the Form Recognizer library. Your snippet shows installing version 3.1.2 and you need 3.2.0b1 or greater. Use command pip install azure-ai-formrecognizer --pre --upgrade to upgrade to the latest beta package.

Also if you're intending to use the latest GA, stable package and not the beta, please see the samples here: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1

@kristapratico kristapratico added Cognitive - Form Recognizer needs-author-feedback More information is needed from author to address the issue. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 15, 2021
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Nov 23, 2021
@ghost
Copy link

ghost commented Nov 23, 2021

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@DFMERA
Copy link
Author

DFMERA commented Nov 23, 2021

Hi, I tried the latest GA sdk and followed the example you shared and it worked, thank you very much.

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. labels Nov 23, 2021
@catalinaperalta
Copy link
Member

Thanks for the response @DFMERA! Will close this issue now then, please feel free to open new issues if there are other things we can help with :)

@catalinaperalta catalinaperalta added issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels Nov 23, 2021
@ghost
Copy link

ghost commented Nov 23, 2021

Hi @DFMERA. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

azure-sdk pushed a commit to azure-sdk/azure-sdk-for-python that referenced this issue Dec 9, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Cognitive - Form Recognizer customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants