9 months ago
Hi there, I need to use Playwright in my Python APIs to extract information from a couple of URLs and while that works fine with my FastAPI setup locally, on Railway I keep getting an error about missing dependencies:
/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)
/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)
I did a bit of Googling and sounds like using the Browserless templates offered by Railway should be the answer but I'm unsure about how to get my Python API code on there.
Any help would be much appreciated. Thanks!
5 Replies
9 months ago
Please see the overview for code examples -
9 months ago
Cheers for the snappy response Brody!
I've already got a version of this template up and running but I'm not sure about how to get my code on there. Also apologies, I'm a Railway noob, but not sure where's this overview that you've mentioned?
A screenshot would be super helpful!
9 months ago
Is this the code example that you're referring to? https://github.com/brody192/playwright-example-python
Found it by searching for Playwright in your Github repos
9 months ago
Cloned that repo (https://github.com/brody192/playwright-example-python) and then spun it up as a service on Railway (intelligent-learning) but getting an internal server error with the message playwright._impl._errors.Error: WebSocket error: wss://planna-browserless-production.up.railway.app/playwright 403 Forbidden
I followed the instructions in the readme for that repo so not sure whats the issue
9 months ago
For anyone else looking for the solution, check out the Railway Discord: https://discord.com/channels/713503345364697088/1270509851528663080/1270509851528663080
Status changed to Solved brody • 9 months ago