Builld Error
darklight2247
FREEOP

a month ago

Hi, im trying to host my discord bot from my github repository and everytime im getting this error: ✖ Railpack could not determine how to build the app.

Solved$20 Bounty

0 Replies

Can you share the GitHub repository?


darklight2247
FREEOP

a month ago

1433544729672286500
1433544730158956500


darklight2247
FREEOP

a month ago

sure


darklight2247
FREEOP

a month ago


Can't view it, can it be public?


darklight2247
FREEOP

a month ago

oops


darklight2247
FREEOP

a month ago

my bad


darklight2247
FREEOP

a month ago

okay


But right away I see you're missing a main.py


OH. Wait.


darklight2247
FREEOP

a month ago

fixed it


darklight2247
FREEOP

a month ago

hm?


Did you set your root directory to be python-bot?


darklight2247
FREEOP

a month ago

i think so?


darklight2247
FREEOP

a month ago

im new to this


darklight2247
FREEOP

a month ago

<:worry_sweat:913884106297839646>


Can you screenshot the top portion of the service's settings?


No problem, that's why we're here 😃


darklight2247
FREEOP

a month ago

in railway?



darklight2247
FREEOP

a month ago

im not really sure where to find that <:pepe1:1416950095177322528>


Just click on the box in the canvas you just created


If you screenshot whatever you see right now I can direct you


darklight2247
FREEOP

a month ago

1433546282550431700


Can you click "Settings" at the top?


Sorry this one

1433546342638026800


Not all the way at the top


darklight2247
FREEOP

a month ago

that calm kindness thing came out of nowhere just now


darklight2247
FREEOP

a month ago

oh nvm


You can delete it


darklight2247
FREEOP

a month ago

okay


darklight2247
FREEOP

a month ago

im in the settings


Can you screenshot the top of that window


darklight2247
FREEOP

a month ago

1433546706317738000


Click this button here, and type in python-bot

1433546803332124700


Then click the little checkmark and click the pink "deploy changes" button at the top


darklight2247
FREEOP

a month ago


darklight2247
FREEOP

a month ago

okay okay


darklight2247
FREEOP

a month ago

i think it works now



darklight2247
FREEOP

a month ago

tysm!


darklight2247
FREEOP

a month ago

it crashed <:panic:1013146540841377812>


Unrelated to your original error, but that's fine. Can you share the logs?


darklight2247
FREEOP

a month ago

Traceback (most recent call last): File "/app/bot.py", line 5459, in main() ~~~~^^ File "/app/bot.py", line 5455, in main bot.run(token) ~~~~~~~^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/discord/client.py", line 929, in run asyncio.run(runner()) ~~~~~~~~~~~^^^^^^^^^^ File "/mise/installs/python/3.13.9/lib/python3.13/asyncio/runners.py", line 195, in run return runner.run(main) ~~~~~~~~~~^^^^^^ File "/mise/installs/python/3.13.9/lib/python3.13/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/mise/installs/python/3.13.9/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete return future.result() ~~~~~~~~~~~~~^^ File "/app/.venv/lib/python3.13/site-packages/discord/client.py", line 918, in runner await self.start(token, reconnect=reconnect) File "/app/.venv/lib/python3.13/site-packages/discord/client.py", line 846, in start await self.login(token) File "/app/.venv/lib/python3.13/site-packages/discord/client.py", line 675, in login data = await self.http.static_login(token) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/discord/http.py", line 843, in static_login raise LoginFailure('Improper token has been passed.') from exc discord.errors.LoginFailure: Improper token has been passed. ~~~~^^ File "/app/bot.py", line 5455, in main Traceback (most recent call last): File "/app/bot.py", line 5459, in main() data = await self.request(Route('GET', '/users/@me')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized File "/app/.venv/lib/python3.13/site-packages/discord/http.py", line 773, in request The above exception was the direct cause of the following exception: bot.run(token) ~~~~~~~^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/discord/client.py", line 929, in run asyncio.run(runner()) ~~~~~~~~~~~^^^^^^^^^^ File "/mise/installs/python/3.13.9/lib/python3.13/asyncio/runners.py", line 195, in run return runner.run(main) ~~~~~~~~~~^^^^^^ File "/mise/installs/python/3.13.9/lib/python3.13/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/mise/installs/python/3.13.9/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete return future.result() ~~~~~~~~~~~~~^^ File "/app/.venv/lib/python3.13/site-packages/discord/client.py", line 918, in runner await self.start(token, reconnect=reconnect) File "/app/.venv/lib/python3.13/site-packages/discord/client.py", line 846, in start await self.login(token) File "/app/.venv/lib/python3.13/site-packages/discord/client.py", line 675, in login data = await self.http.static_login(token) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/discord/http.py", line 843, in static_login raise LoginFailure('Improper token has been passed.') from exc discord.errors.LoginFailure: Improper token has been passed. raise HTTPException(response, data) [2025-10-30 20:05:55] [INFO ] discord.client: logging in using static token Traceback (most recent call last): File "/app/.venv/lib/python3.13/site-packages/discord/http.py", line 839, in static_login


Did you create a variable by the name TOKEN and set it to your bot token?


darklight2247
FREEOP

a month ago

yes


Are you sure the token is valid?


Did you push your .env file to GitHub?


darklight2247
FREEOP

a month ago

yes i was testing the bot from my terminal


darklight2247
FREEOP

a month ago

yes but its private


darklight2247
FREEOP

a month ago

want me to reset the token?


Yeah, but it was just public a few minutes ago. Discord runs a crawler to reset any public tokens. You should reset it.


darklight2247
FREEOP

a month ago

ohh


darklight2247
FREEOP

a month ago

makes sense


When they reset it they actually won't tell you the new one until you reset it yourself.


So you'll have to go into the portal and do it yourself :P


darklight2247
FREEOP

a month ago

thats smart but annoying


darklight2247
FREEOP

a month ago

ill fix it rq


It's actually incredibly smart


I have no idea how Discord watches every single repository and instantly resets tokens


It's amazing


darklight2247
FREEOP

a month ago

true


darklight2247
FREEOP

a month ago

when i reset my token


darklight2247
FREEOP

a month ago

do i change it in the .env or just in the variables would work?


Just variables should work


darklight2247
FREEOP

a month ago

okay time to test


darklight2247
FREEOP

a month ago

still crashed


darklight2247
FREEOP

a month ago

one sec imma try smth rq


darklight2247
FREEOP

a month ago

okay it worked


darklight2247
FREEOP

a month ago


darklight2247
FREEOP

a month ago

fr this time i got a notification from the bot logs


darklight2247
FREEOP

a month ago

lol


darklight2247
FREEOP

a month ago

I changed python3 bot.py to python bot.py in the procfile


Sounds good! Am I okay to close this post?


darklight2247
FREEOP

a month ago

Yes just one question



darklight2247
FREEOP

a month ago

Is it just the 1st 30 days free hosting or how does it work exactly?


If you're on the trial plan, you get $5 of credits or 30 days. Whichever goes first.


darklight2247
FREEOP

a month ago

Oh okay, so next month i have to pay 5$ then


You will have to upgrade to Hobby if you're currently on the trial.


darklight2247
FREEOP

a month ago


darklight2247
FREEOP

a month ago

Okay great! Tysm again


darklight2247
FREEOP

a month ago

<:02_love:1125206133552984115>


Of course!


Loading...