Closed a-MarsWang closed 2 years ago
Hello @a-MarsWang thanks for logging this issue, could you try deploying with the latest 3.8.X supported on azure and see if that changes the outcome?
This is probably due to an issue during the deployment process.
Thanks
@a-MarsWang Can you please also run the following to find the az cli version and share the output?:
az -v
@dmvtech @axelsrz Thank you for your reply.
python 3.8.x doesn't work either. Therefore, I've also tried to deploy this bot using container; however, this is the output that show on my log.
Also, this is the output using az -v
The version of my az cli is 2.29.2 *
Hi @a-MarsWang @dmvtech @axelsrz , I've found the problem that made aiohttp module not be found. I deployed this sample code via VScode extension to Web app.
programming language: python 3.8 az cli version: 2.29.2.* vscode extension: Azure App Service v0.23.0
There are 2 reasons that might cause the stop of the web app:
web run(App, host="localhost", port=CONFIG.PORT)
should change localhost
to 0.0.0.0
az webapp deployment source config-zip
, it will show "python' is not installed" like the log I paste below.In the second scenario(az webapp deployment), you will see that python3
and all modules in requirements.txt
can't be installed. However, I follow step by step with the Microsoft doc.
Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.8 -i /tmp/8d9b4a7ff28e88b --compress-destination-dir -p virtualenv_name=antenv --log-file /tmp/build-debug.log
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues
Oryx Version: 0.2.20210826.1, Commit: f8651349d0c78259bb199593b526450568c2f94a, ReleaseTagName: 20210826.1
Build Operation ID: |uno0CKmsMCk=.cf9b2109_
Repository Commit : cc91edd248eb4a62af4f5a14c8064c29
Detecting platforms...
Detected following platforms:
python: 3.8.12
Version '3.8.12' of platform 'python' is not installed. Generating script to install it...
Using intermediate directory '/tmp/8d9b4a7ff28e88b'.
Copying files to the intermediate directory...
Done in 0 sec(s).
Source directory : /tmp/8d9b4a7ff28e88b
Destination directory: /home/site/wwwroot
Downloading and extracting 'python' version '3.8.12' to '/tmp/oryx/platforms/python/3.8.12'...
Downloaded in 2 sec(s).
Verifying checksum...
Extracting contents...
Done in 18 sec(s).
Python Version: /tmp/oryx/platforms/python/3.8.12/bin/python3.8
Creating directory for command manifest file if it doesnot exist
Removing existing manifest file
Python Virtual Environment: antenv
Creating virtual environment...
Activating virtual environment...
Could not find setup.py or requirements.txt; Not running pip install
Not a vso image, so not writing build commands
Preparing output...
Copying files to destination directory '/tmp/_preCompressedDestinationDir'...
Done in 1 sec(s).
Compressing content of directory '/tmp/_preCompressedDestinationDir'...
Copied the compressed output to '/home/site/wwwroot'
Removing existing manifest file
Creating a manifest file...
Manifest file created.
Done in 35 sec(s).
Hi @a-MarsWang @MarsWangyang
I wasn't able to reproduce the issue with aiohttp
when deploying using az webapp deployment
. I had no problems and did not need to change localhost
to 0.0.0.0
.
Did you happen to do the pip install
before zipping up the bot and deploying? Per documentation, this should not be done.
Closing due to lack of response. Please comment or reopen if you still need assistance on this issue.
@dmvtech I'm able to reproduce this, can you try a linux based web app (which is now the default choice if you choose python stack), or just "az webapp up --runtime PYTHON:3.9 --sku B1 --logs" in python's echobot sample folder
Hi @boydc2014, I'm currently investigating https://github.com/microsoft/BotBuilder-Samples/issues/3805 and I could not publish python bots.
I noticed the following pull requests for python ARM Templates and Deployment templates that was merged today.
#
Perhaps I can try to publish Python bot to see if I'm still able to repro. I will report back soon. Thanks
Hi @boydc2014 @a-MarsWang
I was not able to reproduce this issue any more after the latest publishing docs update.
@a-MarsWang, could you please try to publish the bot from docs here: https://docs.microsoft.com/en-us/azure/bot-service/provision-and-publish-a-bot
Github issues for C# /JS / Java/ Python should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Sample information
Describe the bug
After I deploy
echo-bot.zip
and back to the deployment log, the error "ModuleNotFoundError: No module named 'aiohttp'" display on the log. Even if I re-zipped with aiohttp in requirements.txt, the deploymeny still went wrong.I'd also tried to deploy on VScode via Azure Extension; however, the deployment log also had error, which is "KeyError: 'access_token'."
Command Name
az webapp deployment source config-zip --resource-group {} --name {} --src echo_bot.zip
Errors:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected no aiohttp module error happened when deployment.
Screenshots
Additional context
Add any other context about the problem here.