Issues getting my python server to deploy

I am running a python async server using fastapi however when I run the server on my computer. It seems to work fine. As soon as I try deploying it I get errors regarding this:
RuntimeError: no running event loop
sys:1: RuntimeWarning: coroutine 'run' was never awaited
Traceback (most recent call last):
File "/app/src/lax.py", line 70, in <module>
asyncio.create_task(run())
File "/root/.nix-profile/lib/python3.11/asyncio/tasks.py", line 371, in create_task
loop = events.get_running_loop()
^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: no running event loop
sys:1: RuntimeWarning: coroutine 'run' was never awaited
RuntimeError: no running event loop
sys:1: RuntimeWarning: coroutine 'run' was never awaited
Traceback (most recent call last):
File "/app/src/lax.py", line 70, in <module>
asyncio.create_task(run())
File "/root/.nix-profile/lib/python3.11/asyncio/tasks.py", line 371, in create_task
loop = events.get_running_loop()
^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: no running event loop
sys:1: RuntimeWarning: coroutine 'run' was never awaited
Does anyone know why this would run on a macbook but not on railway? I am using the same command here to start both servers.
13 Replies
Percy
Percy2y ago
Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.
Brody
Brody2y ago
Percy
Percy2y ago
No project ID was provided. Closing thread.
brrrrrrr
brrrrrrr2y ago
wait REDACTED @Brody
Brody
Brody2y ago
can you share some insight into why you waited 10 minutes to send a follow up to percys message?
brrrrrrr
brrrrrrr2y ago
i just saw it right now lol
Brody
Brody2y ago
but percy sends that message instantly once you open the thread
brrrrrrr
brrrrrrr2y ago
ya i know, i just didn't see the message until now my bad
Brody
Brody2y ago
interesting
brrrrrrr
brrrrrrr2y ago
like it was sent i was away from my computer
Brody
Brody2y ago
this issue wouldn't be specific to railway, you are welcome to do your own research on the matter
brrrrrrr
brrrrrrr2y ago
i figured it out 🙂
Brody
Brody2y ago
im glad youve solved it!
Want results from more Discord servers?
Add your server