Getting an error message on the Tutorial, "Enrich an AI search index with custom classes"

John Hancock 0 Reputation points
2024-05-28T03:18:04.7533333+00:00

Good evening

I am working through the tutorial, "Enrich an AI search index with custom classes" and I am in the section, "Create a function app to enrich your search index". I've downloaded and installed all of the extensions as well as extracted the code for movie-genre-function. I am using Python 3.8 as the interpreter.

Yet, I am getting two error messages, the first one says:

ImportError: cannot import name 'cygrpc' from 'grpc.cython' (C:\Program Files\Microsoft\Azure Functions Core Tools\workers\python\3.10/WINDOWS/X64\grpc_cython_init.py)

The second is a popup that says:

Capture

I don't know if these two errors are related. Any assistance would be greatly appreciated.

Thank you.

This question is related to the following Learning Module

Azure Azure Training
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. hossein jalilian 10,825 Reputation points Volunteer Moderator
    2024-05-28T04:02:24.14+00:00

    Hi John Hancock,

    Thanks for posting your question in the Microsoft Q&A forum.

    This error typically happens due to a mismatch between the Python interpreter architecture (32-bit or 64-bit) and the operating system architecture, or because the Python version being used is not supported by the Azure Functions Python Worker

    • Ensure that you are using a 64-bit Python interpreter on a 64-bit operating system
        py -c 'import platform; print(platform.architecture())'
      
    • The Azure Functions Python Worker supports specific Python versions. Currently, the supported versions are 3.6, 3.7, 3.8, and 3.9. Ensure that you are using one of these versions by running
        py --version
        
      
    • Try reinstalling the gRPC library by running the following command:
        python -m pip install grpcio --upgrade
        
      

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.