Home > Net >  Issue azure test chat bot " Error while finding module specification for 'aiohttp.web'
Issue azure test chat bot " Error while finding module specification for 'aiohttp.web'

Time:12-14

I have some issues while trying to use azure test chat bot :

I deployed my bot on azure web app with github actions, everything is going great. But when i'm trying to test my chatbot, nothing happens it throws me an error.

I tried to use differents python versions and also differents requirement version. I have configured port 8000, app_id and password_id in my config.py file.

My web app has his general parameters configured with this command :

 python -m aiohttp.web -H 0.0.0.0 -P 8000 app:init_func

It seems that azure can't find aiohttp. (It works perfectly on local host ) Thank you for your help.

Error app.py requirement.txt

CodePudding user response:

  • By default Kudu assumes that zip deployments do not require any build-related actions like npm install or dotnet publish. So the cause in this case might be pip installation did not been taken care properly.

  • To make it install all required packages in requirements.txt file automatically, we can simply set SCM_DO_BUILD_DURING_DEPLOYMENT to true in appsettings, then deploy again.

  • Need to setup the startup command like

    gunicorn --bind 0.0.0.0 --worker-class aiohttp.worker.GunicornWebWorker --timeout 600 app:APP
    
    
  • Configure the MicrosoftAppId and MicrosoftAppPassword properly

Please refer Reference for more details.

CodePudding user response:

It seems that it wasn't able to install requirements after the deploy. The reason was that path wasn't good even if in the workflow there was a good path.

Solution : I redeployed from another repo where the requirement.txt was in working directory. After that i allowed cors with "*" to get all the the origins access. I also blocked aiohttp to 3.6.2 I launch the webchat and it works new_requirements CORS

  • Related