a year ago
Hello.
I have tried to deploy my code using the minimal code example provided here:
brody192/playwright-example-python (github.com)
However, I can't get it to work. Can you help?
/opt/venv/lib/python3.11/site-packages/playwright/driver/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /nix/store/p3ffjixpnfgkqh20nsrc13vrj3yfi0nj-gcc-13.2.0-lib/lib/libstdc++.so.6)
/opt/venv/lib/python3.11/site-packages/playwright/driver/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/p3ffjixpnfgkqh20nsrc13vrj3yfi0nj-gcc-13.2.0-lib/lib/libstdc++.so.6)
playwright = AsyncPlaywright(next(iter(done)).result())
ERROR:webserver:Exception on request GET /scrapebrowserless
^^^^^^^^^^^^^^^^^^^^^^^^^
async with async_playwright() as p:
await browserless_scraper()
File "/app/webserver.py", line 66, in scrape
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/quart/app.py", line 1535, in dispatch_request
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
result = await self.dispatch_request(request_context)
File "/opt/venv/lib/python3.11/site-packages/quart/app.py", line 1439, in full_dispatch_request
raise error
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Traceback (most recent call last):
Exception: Connection closed while reading from the driver
File "/app/browserless_scraper.py", line 10, in browserless_scraper
File "/app/webserver.py", line 72, in browserless_scraper_job
await browserless_scraper_job()
return await self.ensure_async(handler)(**request_.view_args) # type: ignore
File "/opt/venv/lib/python3.11/site-packages/quart/app.py", line 1029, in handle_user_exception
result = await self.handle_user_exception(error)
File "/opt/venv/lib/python3.11/site-packages/quart/app.py", line 1441, in full_dispatch_request
return await self.full_dispatch_request(request_context)
File "/opt/venv/lib/python3.11/site-packages/quart/app.py", line 1403, in handle_request
File "/opt/venv/lib/python3.11/site-packages/playwright/async_api/_context_manager.py", line 46, in aenter
This is the railway.json:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"nixpacksVersion": "1.24.1",
"builder": "NIXPACKS",
"buildCommand": "pip install -r requirements.txt"
},
"deploy": {
"region": "europe-west4",
"runtime": "V2",
"numReplicas": 1,
"startCommand": "hypercorn webserver:app --bind 0.0.0.0:$PORT",
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}Requirements:
APScheduler==3.10.3
cryptography==41.0.3
itsdangerous==2.1.2
quart==0.19.6
mysql-connector-python
bcrypt
Requests==2.31.0
hypercorn==0.17.3
quart_cors
playwright==1.44.0
beautifulsoup4==4.12.2
8 Replies
a year ago
I'll attack the low hanging fruit, please remove the redundant pip install from your build command.
a year ago
Yes. Sorry about that. It came from a previous advice to user Docker to build the installation.
a year ago
Please attach your build and deploy logs -
a year ago
Hi, we are having exactly the same problem as you. Just the same lines of error. Some days ago this was working correctly. Greetings.
a year ago
I am unable to help without the build and deploy logs, please open your own post and provide them.
a year ago
Thanks for your reply.
a year ago
Closing this thread as we have not heard back from the original poster
Please re-open another thread if needed
Status changed to Solved Railway • over 1 year ago
unaiarambarri
Thanks for your reply.
7 months ago
hi unaiarambarri !
Have you been able to solve your issue ? I'm encountering the same one
Status changed to Open Railway • 7 months ago
