Same as #786 : ModuleNotFoundError: No module named 'app' on startup of the App
Describe the bug
App won't start after default deployment. I ran the deployment from the Azure OpenAI studio:
This lets you create a WebApp and it deploys it with a link back to this repo.
To Reproduce
Steps to reproduce the behavior:
Deploy
Wait the time for the deployment to get up and running (as indicated in the studio)
Go to the deployed App Service
Connect to the front end
Get the application error ':( Application Error
If you are the application administrator, you can access the diagnostic resources.'
Check the log stream
Notice ModuleNotFoundError: No module named 'app' in the app deployemnt
Expected behavior
Working example application :-).
Screenshots
If applicable, add screenshots to help explain your problem.
Configuration: Please provide the following
Azure OpenAI model name and version (e.g. 'gpt-35-turbo-16k, version 0613'): gpt-4o 2024-05-13
Is chat history enabled?: No
Are you using data? If so, what data source? (e.g. Azure AI Search, Azure CosmosDB Mongo vCore, etc): I have added Azure AI Search to the Chat playground before I deployed.
Verify the startup command and runtime configuration by showing the output of the following az CLI command:
az webapp show --name <app name> --resource-group <resource group name> --query "{startupCommand: siteConfig.appCommandLine, runtime: siteConfig.linuxFxVersion}"
If the application deployment is failing, please share the deployment logs using the following az CLI command:
az webapp log deployment show --name <app name> --resource-group <rg name>
If the application is crashing after deployment, please share the application logs using the following az CLI command:
az webapp log tail --name <app name> --resource-group <resource group name>
Output:
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()--- End of stack trace from previous location ---at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)at Kudu.Services.Web.Tracing.TraceMiddleware.Invoke(HttpContext context) in /tmp/KuduLite/Kudu.Services.Web/Tracing/TraceMiddleware.cs:line 97
2024-09-25T20:25:05 Outgoing response, type: response, statusCode: 500, statusText: InternalServerError/home/LogFiles/2024_09_25_lw1sdlwk000042_default_docker.log (https://xms-test-app.scm.azurewebsites.net/api/vfs/LogFiles/2024_09_25_lw1sdlwk000042_default_docker.log)
2024-09-25T21:01:49.713040952Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-25T21:01:49.713043952Z File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
2024-09-25T21:01:49.713047552Z File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2024-09-25T21:01:49.713050652Z File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
2024-09-25T21:01:49.713451248Z ModuleNotFoundError: No module named 'app'
2024-09-25T21:01:49.714568539Z [2024-09-25 21:01:49 +0000] [69] [INFO] Worker exiting (pid: 69)
2024-09-25T21:01:50.067040476Z [2024-09-25 21:01:50 +0000] [63] [ERROR] Worker (pid:69) exited with code 3
2024-09-25T21:01:50.091129767Z [2024-09-25 21:01:50 +0000] [63] [ERROR] Shutting down: Master
2024-09-25T21:01:50.091149867Z [2024-09-25 21:01:50 +0000] [63] [ERROR] Reason: Worker failed to boot./home/LogFiles/2024_09_25_lw1sdlwk000042_docker.log (https://xms-test-app.scm.azurewebsites.net/api/vfs/LogFiles/2024_09_25_lw1sdlwk000042_docker.log)
2024-09-25T21:01:45.092Z INFO - docker run -d --expose=8181 --name xms-test-app_0_00fcf0a0_middleware -e WEBSITE_SITE_NAME=xms-test-app -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=xms-test-app.azurewebsites.net -e WEBSITE_INSTANCE_ID=9e1f6eb78aa306362994025a9019b01d24ea90e4aa6191a0617cc39ab9f04ceb mcr.microsoft.com/appsvc/middleware:stage5 REDACTED
2024-09-25T21:01:45.099Z INFO - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics t2024-09-25T21:01:48.682Z INFO - Initiating warmup request to container xms-test-app_0_00fcf0a0_msiProxy for site xms-test-app
2024-09-25T21:01:48.829Z INFO - Container xms-test-app_0_00fcf0a0_msiProxy for site xms-test-app initialized successfully and is ready to serve requests.
2024-09-25T21:01:48.837Z INFO - Initiating warmup request to container xms-test-app_0_00fcf0a0 for site xms-test-app
2024-09-25T21:01:51.227Z ERROR - Container xms-test-app_0_00fcf0a0 for site xms-test-app has exited, failing site start
2024-09-25T21:01:51.228Z INFO - Initiating warmup request to container xms-test-app_0_00fcf0a0_middleware for site xms-test-app
2024-09-25T21:01:56.203Z INFO - Container xms-test-app_0_00fcf0a0_middleware for site xms-test-app initialized successfully and is ready to serve requests.
2024-09-25T21:01:56.229Z ERROR - Container xms-test-app_0_00fcf0a0 didn't respond to HTTP pings on port: 8000, failing site start. See container logs for debugging.
Same as #786 :
ModuleNotFoundError: No module named 'app'
on startup of the AppDescribe the bug App won't start after default deployment. I ran the deployment from the Azure OpenAI studio:
This lets you create a WebApp and it deploys it with a link back to this repo.
To Reproduce Steps to reproduce the behavior:
ModuleNotFoundError: No module named 'app'
in the app deployemntExpected behavior Working example application :-).
Screenshots If applicable, add screenshots to help explain your problem.
Configuration: Please provide the following
gpt-4o 2024-05-13
No
I have added Azure AI Search to the Chat playground before I deployed.
Output:
Logs
If the application deployment is failing, please share the deployment logs using the following az CLI command:
If the application is crashing after deployment, please share the application logs using the following az CLI command:
Output: