telegram bot scripts, issues in python interpreter

umartolibov
TRIAL

2 years ago

Greetings,
I wanted to report some bugs regarding the building/deploying process.
Sometimes after deploying my project, the python interpreter is raising silly errors (mostly syntax) that's actually not an error. I'm fixing it by removing error part of my code which is a bit challenging for me. I would be grateful if you could take care of this issue.

thanks.

View Deploy details

ⓘ Deployment information is only viewable by Project members and Railway admins.

Solved

4 Replies

2 years ago

This could be due to differing versions of Python, by default Railway will run version 3.8, but locally you could be using a newer version.

See this docs page on what versions of Python Railway supports and how to get Railway to run a specific version -

https://nixpacks.com/docs/providers/python#setup


umartolibov
TRIAL

2 years ago

I see, it was building with python38. I read the docs, if I'm correct, I need to specify python version in env variable: "NIXPACKSPYTHONVERSION" , I tried to set it to - 3.11 , 311, python311 but its still building with python38. in what format should specify the python version or should I add configuration file to my project and specify the version there?

I'm deploying my scripts from github not from cli.


2 years ago

I would not recommend the service variable method, as per standard practice use a runtime.txt file with just 3.11 in it.

The version can also be set in a Pipfile and a .python-version file, so make sure they are also set to 3.11 but only if you already have them.


Status changed to Solved Railway over 1 year ago


umartolibov
TRIAL

2 years ago

thanks a lot, it helped


Loading...