10 months 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.
84 Replies
10 months ago
Can you share the GitHub repository?
10 months ago
Can't view it, can it be public?
10 months ago
But right away I see you're missing a main.py
10 months ago
OH. Wait.
10 months ago
Did you set your root directory to be python-bot?
10 months ago
Can you screenshot the top portion of the service's settings?
10 months ago
No problem, that's why we're here 😃
10 months ago
Yep
10 months ago
Just click on the box in the canvas you just created
10 months ago
If you screenshot whatever you see right now I can direct you
10 months ago
Can you click "Settings" at the top?
10 months ago
Sorry this one

10 months ago
Not all the way at the top
10 months ago
You can delete it
10 months ago
Can you screenshot the top of that window
10 months ago
Click this button here, and type in python-bot

10 months ago
Then click the little checkmark and click the pink "deploy changes" button at the top
10 months ago
Hurrah!
10 months ago
Unrelated to your original error, but that's fine. Can you share the logs?
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```
10 months ago
Did you create a variable by the name TOKEN and set it to your bot token?
10 months ago
Are you sure the token is valid?
10 months ago
Did you push your .env file to GitHub?
10 months ago
Yeah, but it was just public a few minutes ago. Discord runs a crawler to reset any public tokens. You should reset it.
10 months ago
When they reset it they actually won't tell you the new one until you reset it yourself.
10 months ago
So you'll have to go into the portal and do it yourself :P
10 months ago
It's actually incredibly smart
10 months ago
I have no idea how Discord watches every single repository and instantly resets tokens
10 months ago
It's amazing
10 months ago
Just variables should work
10 months ago
Sounds good! Am I okay to close this post?
10 months ago
Mhm?
Is it just the 1st 30 days free hosting or how does it work exactly?
10 months ago
If you're on the trial plan, you get $5 of credits or 30 days. Whichever goes first.
10 months ago
You will have to upgrade to Hobby if you're currently on the trial.
10 months ago
Of course!



