while hosting webapp in azure i am getting this error ModuleNotFoundError: No module named '_overlapped'

Kesavamurthi D 106 Reputation points

i am hosting a flask app in azure .
in local installed all packages in virtualenv and generated pip freeze requiremnts.txt
i tried uploading it to wep app.it is saying critical error occurred while starting

pls help

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,040 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 18,871 Reputation points

    Thanks for asking question! If you see an error like ModuleNotFoundError: No module named 'example', this means that Python could not find one or more of your modules when the application started.

    This most often occurs if you deploy your virtual environment with your code. Virtual environments are not portable, so a virtual environment should not be deployed with your application code.

    Instead, let Oryx create a virtual environment and install your packages on the web app by creating an app setting, SCM_DO_BUILD_DURING_DEPLOYMENT, and setting it to 1.
    This will force Oryx to install your packages whenever you deploy to App Service.

    For more information, please see this article on virtual environment portability.

    More details: https://learn.microsoft.com/en-us/azure/app-service/configure-language-python#troubleshooting

    Let us know if further query or issue remains.