I am trying to deploy a bot to Azure built on Microsoft Bot Framework in Python. The Bot is working locally on Bot Emulator. Using Visual Studio Code for the bot development.
Deployed the Bot to Azure on a WebApp successfully using the startup command as :
python3.7 -m aiohttp.web -H 0.0.0.0 -P 8000 app:init_func
My app.py file:
def init_func(argv):
app = web.Application(middlewares=[aiohttp_error_middleware])
app.router.add_post("/api/messages", messages)
return app
if __name__ == "__main__":
app = init_func(None)
try:
web.run_app(app, host="0.0.0.0", port=CONFIG.PORT)
except Exception as error:
raise error
**The Error I am getting is **
2021-06-07T14:15:21.045987180Z aiohttp.web: error: unable to import main: No module named 'app'
I referred following answers from stackoverflow, but it doesn't work for me
Also referred the Microsoft documentation:
I am stuck in deploying this bot to Azure for a week now. Any help/pointers/suggestions is much appreciated.
Thanks in advance.
Some restrictions to create app id and password in your student azure account, try to check without app id and password
hope it will work.