microsoft / sample-app-aoai-chatGPT

Sample code for a simple web chat experience through Azure OpenAI, including Azure OpenAI On Your Data.
MIT License
1.64k stars 2.56k forks source link

gunicorn error on webapp startup #606

Closed jkingdon-ms closed 8 months ago

jkingdon-ms commented 8 months ago

Describe the bug

Seeing this is the App Service Log Stream after deploying to Azure from my machine:

2024-02-10T03:04:29.689701450Z Traceback (most recent call last): 2024-02-10T03:04:29.689704850Z File "/opt/python/3.11.4/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 136, in handle 2024-02-10T03:04:29.689708050Z self.handle_request(listener, req, client, addr) 2024-02-10T03:04:29.689711050Z File "/opt/python/3.11.4/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 179, in handle_request 2024-02-10T03:04:29.689714250Z respiter = self.wsgi(environ, resp.start_response) 2024-02-10T03:04:29.689717350Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-02-10T03:04:29.689720950Z TypeError: Quart.call() missing 1 required positional argument: 'send'

To Reproduce Steps to reproduce the behavior:

  1. run az webapp up --runtime PYTHON:3.11 --sku B1 --name placeholder-service-123 --resource-group placeholder-rg --location eastus2 --subscription abc123
  2. Deployment completes
  3. Observe Log Stream with Error aforementioned
  4. Navigate to 'https://placeholder-service-123.azurewebsites.net/' and see 'Internal Server Error'

Expected behavior

  1. run az webapp up --runtime PYTHON:3.11 --sku B1 --name placeholder-service-123 --resource-group placeholder-rg --location eastus2 --subscription abc123
  2. Deployment completes
  3. Observe Log Stream with no Errors
  4. Navigate to 'https://placeholder-service-123.azurewebsites.net/' and see chatbot site

Configuration: Please provide the following

beplay commented 8 months ago

Maybe linked to #578 ?

QuentinAd commented 8 months ago

Related to #578 and #600 and #602

jkingdon-ms commented 8 months ago

This seems mostly related to #578

sarah-widder commented 8 months ago

@jkingdon-ms does setting the startup command like below resolve the issue? image

jkingdon-ms commented 8 months ago

it does solve that particular problem, thanks @sarah-widder . though now i am seeing a different issue where none of my env vars defined in .env are included in the deployment.

i've resolved that issue for now though by just manually entering them in the Portal. Screenshot 2024-02-12 at 2 30 26 PM