Deployment issue with flask py

using autoscale with flask for my python script, seems to get stuck at the “Promote” tab, any fixes?

wrong answer to the wrong topic lil bro

whoops my bad im new to this dude :saluting_face:

Can you share a link to a repl that cannot be deployed?

1 Like

https://replit.com/@meIs7/charlie-nickname?v=1

You are trying to launch a Discord bot using Autoscale deployment, which is not recommended. Autoscale deployments are designed for websites with a backend, for bots it is better to use a Reserved VM deployment.

2 Likes

discord bots works for js on auto scale? so why wont work in py and im not intrested in the VM deployment, just tell me the fixes for this

Does your code run outside of deployment?


In addition, you have a userconfig file that stores data that other users should not see (bot token, channel id). Therefore, you should transfer the data from there to the secrets and delete this file, for security.

1 Like

oops sorry that file was not needed i forgot to delete it, anyways yep works fine outside deployment
image

i just want to know why does it gives an error at the “Promote” tab when i auto scale it

Can you send the contents of the Logs tab?

1 Like
01/05/24 10:57:18 PM

/home/runner/3d207fe5-b9e0-4bb6-822f-425fc3da0f62/venv/bin/python: line 3: /nix/store/7c2d4f13a93vf8xx548czn0v0hsgrrkv-python3-3.10.0/bin/python3.10: No such file or directory

01/05/24 10:57:18 PM

exec [sh -c python main.py] error=exit status 127

01/05/24 10:57:18 PM

hostingpid1: crash loop detected

01/05/24 10:57:17 PM

/home/runner/3d207fe5-b9e0-4bb6-822f-425fc3da0f62/venv/bin/python: line 3: /nix/store/7c2d4f13a93vf8xx548czn0v0hsgrrkv-python3-3.10.0/bin/python3.10: No such file or directory

01/05/24 10:57:17 PM

exec [sh -c python main.py] error=exit status 127

01/05/24 10:57:17 PM

exec [sh -c python main.py] error=exit status 127

01/05/24 10:57:17 PM

/home/runner/3d207fe5-b9e0-4bb6-822f-425fc3da0f62/venv/bin/python: line 3: /nix/store/7c2d4f13a93vf8xx548czn0v0hsgrrkv-python3-3.10.0/bin/python3.10: No such file or directory

01/05/24 10:57:16 PM

starting up user application

any updates for possible solution? experiencing the same thing when I try to deploy my slack bot app to autoscale.

I do not know what the reason for these errors is, but I suspect it is because you are using Autoscale deployment instead of Reserved VM for your bots. If there are errors with the workaround in creating a Flask server, then most likely it does not work in your case and you need to switch to Reserved VM deployment. I understand that you don’t want to pay $7 or more per month for a bot, but this is still the only way out that I see.

2 Likes

Hey, I’m not a moderator but I’m pretty sure being unkind to another is against the Community Standards

are their alternatives to “flask” in order for the autoscale to work with py scripts

huh? i don’t see anything unkind in their , i only told them to take off the out of context answer they posted

I know about another Python web framework called Django, but it’s too bulky and will take up 90% of your repl, so it’s not suitable for you. You could try to run the server using other frameworks such as FastAPI or CherryPy, but I do not guarantee that this will help and I will not be able to help you with their configuration, since I do not know anything about them.