I can't get my project to run correctly, crashed.
After loading almost completely, and being in green, the project simply crashes and the service is not available at any time, I tried several things with my docker file, but none of this solved it.
4de4b796-fa65-4a2f-9c38-187fd073fed7
40 Replies
Project ID:
4de4b796-fa65-4a2f-9c38-187fd073fed7
please share your repo
4de4b796-fa65-4a2f-9c38-187fd073fed7
This?
thats a project id, but id like you to share your github repo if possible, it would speed debugging up
thats all
some of the issues i see
- this is a flask app, but you are trying to use uvicorn
- you are copying in your requirements.txt file but aren't installing the packages in it
- you may be missing some packages in your requirements.txt file
- you are scraping Instagram, scraping is a big grey area on railway and is even listed in their tos
If I am installing the requirements, and I review it, I think I am not missing anything
Regarding flask app, how should I use it? What I found on the internet about how to run a test for this is what I put in the code
And regarding the terms of service, I am running a selenium test and I use my own resources
it doesnt matter, you are running the service on railway, but im not going to police you on that, so just know people have been banned for less.
maybe look into using Instagram's api?
unless im blind (its possible) i dont see the line in your dockerfile to install from the requirements.txt file
you want to use gunicorn
On line 11 pip install -r requirements.txt, that doesn't work?
see, told you its possible that im blind
okay then back to my first point, line 15 of your dockerfile, you are trying to start you app with uvicorn, you need to be using gunicorn instead
I'm confused, I thought it was the same
uvicorn is not the same as gunicorn
for flask, you want gunicorn
Then I would have to find a way to change the command on line 15 where gunicorn runs.
just change it? with your text editor of choice, you can even edit the file in github itself
And the syntax is the same? that's what I mean
yeah just how i wrote it, theres no need to overthink this
Now it seems that if I load the module, but after trying the same thing several times it always gives the error ModuleNotFoundError: No module named 'app'
I am always amazed, on my localhost everything always works, when I deploy something always fails hahaha
do you have an app.py or a main.py?
No, my file has another name, should it have one of those?
what is your file name
original copy.py
I thought that doesn't affect anything, actually a newbie here
this is the copy.py file?
Yes, it is the only .py file
as someone who has helped thousands of people here, running locally is always going to be easier than running in a production environment
Solution
then line 15 of your dockerfile should be
And my .py file should be called app.py?
no? the
app
part of that is referring to line 9 of your copy.py fileok
let me know how this goes
It works perfectly, thank you very much. I'm new to all this and people like you help a lot!
happy to help!
Out of curiosity, how many years of experience do you have?
with python? none, im not a python dev
I mean this whole world
uh maybe 4-5 years in tech stuff
That's a lot! Have a good night, greetings!
have a good/day night as well!