"Deploy to web app" button in VS Code Azure extension does not work
I am following this tutorial:
I followed it exactly, using the VS Code instructions. The code runs successfully on my computer. When I clicked to deploy to my Azure web app, VS code said the a app had deployed successfully, but in the web app's logs I am getting this error, over and over again: 2025-04-18T19:43:37.988878817Z python: can't open file '/tmp/8dd7eafea962688/app.py': [Errno 2] No such file or directory
Here is the complete log:
2025-04-18T19:43:32.048864690Z _____
2025-04-18T19:43:32.049406635Z / _ \ __________ _________ ____
2025-04-18T19:43:32.049413157Z / /\ \__ / | _ __ _/ __ \
2025-04-18T19:43:32.049418747Z / | / /| | /| | /\ ___/
2025-04-18T19:43:32.049423957Z _| /_____ _/ || ___ >
2025-04-18T19:43:32.049429187Z / / /
2025-04-18T19:43:32.049434326Z A P P S E R V I C E O N L I N U X
2025-04-18T19:43:32.049439466Z
2025-04-18T19:43:32.049444485Z Documentation: http://aka.ms/webapp-linux
2025-04-18T19:43:32.049449375Z Python 3.11.11
2025-04-18T19:43:32.049454123Z Note: Any data outside '/home' is not persisted
2025-04-18T19:43:32.436711992Z Starting OpenBSD Secure Shell server: sshd.
2025-04-18T19:43:32.463492381Z WEBSITES_INCLUDE_CLOUD_CERTS is not set to true.
2025-04-18T19:43:32.502178737Z Updating certificates in /etc/ssl/certs...
2025-04-18T19:43:34.867697005Z 2 added, 0 removed; done.
2025-04-18T19:43:34.869770478Z Running hooks in /etc/ca-certificates/update.d...
2025-04-18T19:43:34.872424744Z done.
2025-04-18T19:43:34.882079285Z CA certificates copied and updated successfully.
2025-04-18T19:43:34.952985160Z Site's appCommandLine: python app.py
2025-04-18T19:43:34.955849681Z Launching oryx with: create-script -appPath /home/site/wwwroot -output /opt/startup/startup.sh -virtualEnvName antenv -defaultApp /opt/defaultsite -userStartupCommand 'python app.py'
2025-04-18T19:43:35.022967755Z Found build manifest file at '/home/site/wwwroot/oryx-manifest.toml'. Deserializing it...
2025-04-18T19:43:35.026192030Z Build Operation ID: 3711630f2cee670d
2025-04-18T19:43:35.027191641Z Output is compressed. Extracting it...
2025-04-18T19:43:35.027305264Z Oryx Version: 0.2.20250121.2, Commit: d363b83aad8365d7e91cc246d6dfb3ddad209ddb, ReleaseTagName: 20250121.2
2025-04-18T19:43:35.027941285Z Extracting '/home/site/wwwroot/output.tar.gz' to directory '/tmp/8dd7eafea962688'...
2025-04-18T19:43:35.863134717Z App path is set to '/tmp/8dd7eafea962688'
2025-04-18T19:43:35.984902506Z Writing output script to '/opt/startup/startup.sh'
2025-04-18T19:43:37.287023493Z Using packages from virtual environment antenv located at /tmp/8dd7eafea962688/antenv.
2025-04-18T19:43:37.287062125Z Updated PYTHONPATH to '/agents/python:/opt/startup/app_logs:/tmp/8dd7eafea962688/antenv/lib/python3.11/site-packages'
2025-04-18T19:43:37.988878817Z python: can't open file '/tmp/8dd7eafea962688/app.py': [Errno 2] No such file or directory
2025-04-18T19:43:30.434Z INFO - 3.11_20250213.3.tuxprod Pulling from appsvc/python
2025-04-18T19:43:30.458Z INFO - Digest: sha256:6d051b593cc0ce882070c5f232cb0efa6cbaaf757046271a5a4eb22521fdcef6
2025-04-18T19:43:30.459Z INFO - Status: Image is up to date for 10.1.0.6:13209/appsvc/python:3.11_20250213.3.tuxprod
2025-04-18T19:43:30.462Z INFO - Pull Image successful, Time taken: 0 Seconds
2025-04-18T19:43:31.366Z INFO - Starting container for site
2025-04-18T19:43:31.367Z INFO - docker run -d --expose=8000 --name ragchatwebapp_0_8cdce6aa -e WEBSITE_USE_DIAGNOSTIC_SERVER=false -e WEBSITE_SITE_NAME=ragchatwebapp -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=ragchatwebapp-dsfjcwc7heb0d7gs.westus-01.azurewebsites.net -e WEBSITE_INSTANCE_ID=870d616759e74713524da24210e88870fbcc76bc99b00f44c089fc8ca08f9724 appsvc/python:3.11_20250213.3.tuxprod REDACTED
2025-04-18T19:43:31.367Z INFO - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2025-04-18T19:43:32.519Z INFO - Initiating warmup request to container ragchatwebapp_0_8cdce6aa for site ragchatwebapp
2025-04-18T19:43:38.658Z ERROR - Container ragchatwebapp_0_8cdce6aa for site ragchatwebapp has exited, failing site start
2025-04-18T19:43:38.665Z ERROR - Container ragchatwebapp_0_8cdce6aa didn't respond to HTTP pings on port: 8000. Failing site start. See container logs for debugging.
2025-04-18T19:43:38.671Z INFO - Stopping site ragchatwebapp because it failed during startup.