this is error message:
First:
Traceback (most recent call last):File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1463, in wsgi_appresponse = self.full_dispatch_request()Second:
GET500921B1.1 sChrome 123 ``https://flask-selenium-app-qs6rhz6vcq-du.a.run.app/
I created a dynamic website scraper using Selenium and Flask. It works fine locally, but when I configure it with Docker and upload it to Google Run, the error above appears.
The current requirements.txt is as follows: There is no need for anything else since it is simply a simple scraping of one page.
flask==3.0.2beautifulsoup4==4.12.3selenium==4.19.0gunicorn==21.2.0When configuring the container, Python was version 3.12.
I changed it to work by setting the port to 8080.I also ran wsgi.py as shown below.
if __name__ == "__main__": app.run(port=8080)The same goes for Docker.
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8080", "wsgi:app"] app.run(port=8080)