#Deployment logs not showing pritnts

32 messages · Page 1 of 1 (latest)

teal mesa
#

I ran my code locally and it prints the messages but for some reason when I run on railway it doesn't print nothing.
Service ID: e688225d-0606-4eff-a26c-58bf96ca51cb

shell zincBOT
#

Project ID: e688225d-0606-4eff-a26c-58bf96ca51cb

knotty heath
#

python?

teal mesa
#

yes it's python

knotty heath
#

what framework?

teal mesa
#

no framework, it's just a python code that uses selenium to fetch data from a website. The logs showed up but today.

knotty heath
#

are you using any kind of logger?

teal mesa
knotty heath
teal mesa
knotty heath
#

I see logs, so has the issue disappeared?

teal mesa
#

No, when I ran the script yesterday on railway It should've printed that message "Fetching events" as soon as it finsished downloading chrome driver but it only printed today.

#

When I ran the code locally yesterday it printed the message as soon as it finished downloading chrome driver.

knotty heath
#

and you're just using print statements?

#

either way set PYTHONUNBUFFERED = true in your services variables

teal mesa
#

I have prints statements and sys.stdout.write

teal mesa
knotty heath
#

correct

teal mesa
#

Added the variable:

#

But still got the same problem:

#

It should've printed the fetching message

knotty heath
#

did you let it redoploy?

teal mesa
#

yes

knotty heath
#

well then it's not a buffer issue, can I see your repo?

teal mesa
knotty heath
#

does coingecko not have an api?

teal mesa
#

Yes they have, didn't know that just wrote the code. But that won't solve the issue I have with other projects.

knotty heath
#

haha i know

teal mesa
#

Maybe it's a selenium thing.Let me see if it prints with projects that don't have it.

knotty heath
#

i mean you didnt even need selenium, it could have all been done with pythons request module and bs4

#

i can see inefficiencies with the code, but none that would cause print to not well print, so if youve tried that repo with PYTHONUNBUFFERED = 1 and it still didnt work, then im out of ideas, sorry