jakeAnon
jakeAnon
Explore posts from servers
RRailway
Created by jakeAnon on 6/27/2023 in #✋|help
Can railway be used in a work setting?
awesome thanks
8 replies
RRailway
Created by jakeAnon on 6/27/2023 in #✋|help
Can railway be used in a work setting?
Ok thank you aside from that it is ok?
8 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
trust me if i could i would
23 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
odd because that one link you shared has 2.7 on there
23 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
/usr/bin/python2: No such file or directory
&
/usr/bin/python2.7: No such file or directory
&
/usr/bin/python27: No such file or directory
/usr/bin/python2: No such file or directory
&
/usr/bin/python2.7: No such file or directory
&
/usr/bin/python27: No such file or directory
23 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
created virtual environment CPython3.10.9.final.0-64 in 423ms
creator CPython3Posix(dest=/opt/virtualenv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
added seed packages: Flask==1.1.2, Flask_Cors==3.0.10, Jinja2==3.1.2, MarkupSafe==2.1.2, Werkzeug==2.2.3, click==8.1.3, itsdangerous==2.1.2, pip==22.2.2, python_dotenv==0.18.0, setuptools==65.3.0, six==1.16.0, virtualenv==16.7.10, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Traceback (most recent call last):
File "/app/main.py", line 1, in <module>
from flask import Flask, request, abort
File "/opt/virtualenv/lib/python3.10/site-packages/flask/__init__.py", line 14, in <module>
from jinja2 import escape
ImportError: cannot import name 'escape' from 'jinja2' (/opt/virtualenv/lib/python3.10/site-packages/jinja2/__init__.py)
created virtual environment CPython3.10.9.final.0-64 in 423ms
creator CPython3Posix(dest=/opt/virtualenv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
added seed packages: Flask==1.1.2, Flask_Cors==3.0.10, Jinja2==3.1.2, MarkupSafe==2.1.2, Werkzeug==2.2.3, click==8.1.3, itsdangerous==2.1.2, pip==22.2.2, python_dotenv==0.18.0, setuptools==65.3.0, six==1.16.0, virtualenv==16.7.10, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Traceback (most recent call last):
File "/app/main.py", line 1, in <module>
from flask import Flask, request, abort
File "/opt/virtualenv/lib/python3.10/site-packages/flask/__init__.py", line 14, in <module>
from jinja2 import escape
ImportError: cannot import name 'escape' from 'jinja2' (/opt/virtualenv/lib/python3.10/site-packages/jinja2/__init__.py)
looks like the virtualenv its creating is using 3.10.9 and not 2.7
23 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
I changed the [start] cmd to a single string as thats what it was expecting
23 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
my apologies it is just the capital F, meant to delete that
23 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
However I am now getting new error, Traceback (most recent call last): File "main.py", line 1, in <module> from flask import Flask, request, abort ImportError: No module named flask with my requirements.txt
virtualenv==16.7.10
Flask==1.1.2
flask_cors==3.0.10
python-dotenv==0.18.0
virtualenv==16.7.10
Flask==1.1.2
flask_cors==3.0.10
python-dotenv==0.18.0
23 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
For people in future: Was able to get it the venv addressed by using following nixpacks.toml
[phases.setup]
nixPkgs = ['python27', 'gcc', 'virtualenv']

[phases.install]
cmds = ['virtualenv /opt/virtualenv && . /opt/virtualenv/bin/activate && pip install -r requirements.txt']

[start]
cmd = 'python main.py'
[phases.setup]
nixPkgs = ['python27', 'gcc', 'virtualenv']

[phases.install]
cmds = ['virtualenv /opt/virtualenv && . /opt/virtualenv/bin/activate && pip install -r requirements.txt']

[start]
cmd = 'python main.py'
23 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
thanks, ill give it a try and report back
23 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
started failing once i added a runtime.txt with python-2.7.10
23 replies
RRailway
Created by jakeAnon on 3/28/2023 in #✋|help
Deploying python 2.7 flask app
is there way to disable? my requirements.txt file just has
Flask==1.1.2
flask_cors==3.0.10
python-dotenv==0.18.0
Flask==1.1.2
flask_cors==3.0.10
python-dotenv==0.18.0
23 replies
RRailway
Created by jakeAnon on 3/27/2023 in #✋|help
Making flask app secure
yeah going to do some digging , thanks for the tips
12 replies
RRailway
Created by jakeAnon on 3/27/2023 in #✋|help
Making flask app secure
atm yes
12 replies
RRailway
Created by jakeAnon on 3/27/2023 in #✋|help
Making flask app secure
no 😅
12 replies
RRailway
Created by jakeAnon on 3/27/2023 in #✋|help
Making flask app secure
N/A
12 replies