I get this error in the logs:
Traceback (most recent call last):
File “/layers/google.python.pip/pip/lib/python3.12/site-packages/gunicorn/arbiter.py”, line 609, in spawn_worker
worker.init_process()
File “/layers/google.python.pip/pip/lib/python3.12/site-packages/gunicorn/workers/base.py”, line 134, in init_process
self.load_wsgi()
File “/layers/google.python.pip/pip/lib/python3.12/site-packages/gunicorn/workers/base.py”, line 146, in load_wsgi
self.wsgi = self.app.wsgi()
Error in the Logs Explorer:
Traceback (most recent call last):
File “/layers/google.python.pip/pip/lib/python3.12/site-packages/gunicorn/arbiter.py”, line 609, in spawn_worker
worker.init_process()
File “/layers/google.python.pip/pip/lib/python3.12/site-packages/gunicorn/workers/base.py”, line 134, in init_process
self.load_wsgi()
File “/layers/google.python.pip/pip/lib/python3.12/site-packages/gunicorn/workers/base.py”, line 146, in load_wsgi
self.wsgi = self.app.wsgi()
No errors:
Executing task: (set -o pipefail && gcloud run deploy idx-pythonflaskfinance-2610882 --source . --region northamerica-northeast1 --allow-unauthenticated 2>&1 | tee /tmp/integrations.log)
source /home/user/pythonflaskfinance/.venv/bin/activate
This command is equivalent to running gcloud builds submit --pack image=[IMAGE] . and gcloud run deploy idx-pythonflaskfinance-2610882 --image [IMAGE]
Building using Buildpacks and deploying container to Cloud Run service [idx-pythonflaskfinance-2610882] in project [stockoverflow2022] region [northamerica-northeast1]
Building and deploying…
Uploading sources…done
Building Container…done
Setting IAM Policy…done
Creating Revision…done
Routing traffic…done
Done.
Service [idx-pythonflaskfinance-2610882] revision [idx-pythonflaskfinance-2610882-00003-cfj] has been deployed and is serving 100 percent of traffic.
Service URL: https://idx-pythonflaskfinance-2610882-j4bn5fufta-nn.a.run.app
Terminal will be reused by tasks, press any key to close it.
I found creating a new Flask/Python project deployed ok but my old one didn’t. Seems the structure of the projects have changed - e.g. differences in projects’ devserver.sh were
python -m flask --app src/main run -p $PORT --debug
vs
python -m flask --app main run -p $PORT --debug
which doesn’t affect deployment but is evidence that the location of Python files in the template has changed over the last year or so. This might have something to do with it. Maybe the Docker deploy assumes a certain project structure - just speculating.