Hi, so since Heroku and Github’s linking isn’t working, I decided to try out Render. All is going well but I can’t get it to deploy, as it needs a start command. Can anybody help me?
We’re using uvicorn, try something like:
uvicorn main:app --host=0.0.0.0 --port=${PORT:-5000}
Should be able to work.
Thank you, it worked.
Now it deploys, but it doesn’t actually function correctly. When I try to do the group members link, I get this error.
{"detail":[{"loc":["query","key"],"msg":"field required","type":"value_error.missing"}]}
Furthermore, when I attempt to do it in-game, this appears in console.
It says this in the Render logs too.
840&role_number=140 HTTP/1.1" 500 Internal Server Error
May 19 12:18:43 AM ERROR: Exception in ASGI application
May 19 12:18:43 AM Traceback (most recent call last): File "/opt/render/project/src/.venv/lib/python3.7/site-packages/uvicorn/protocols/http/h11_impl.py", line 369, in run_asgi result = await app(self.scope, self.receive, self.send) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 59, in __call__ return await self.app(scope, receive, send) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/fastapi/applications.py", line 199, in __call__ await super().__call__(scope, receive, send) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/starlette/applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/starlette/middleware/errors.py", line 181, in __call__ raise exc from None File "/opt/render/project/src/.venv/lib/python3.7/site-packages/starlette/middleware/errors.py", line 159, in __call__ await self.app(scope, receive, _send) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/starlette/exceptions.py", line 82, in __call__ raise exc from None File "/opt/render/project/src/.venv/lib/python3.7/site-packages/starlette/exceptions.py", line 71, in __call__ await self.app(scope, receive, sender) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/starlette/routing.py", line 580, in __call__ await route.handle(scope, receive, send) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/starlette/routing.py", line 241, in handle await self.app(scope, receive, send) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/starlette/routing.py", line 52, in app response = await func(request) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/fastapi/routing.py", line 215, in app dependant=dependant, values=values, is_coroutine=is_coroutine File "/opt/render/project/src/.venv/lib/python3.7/site-packages/fastapi/routing.py", line 149, in run_endpoint_function return await dependant.call(**values) File "./main.py", line 47, in read_items await target.setrole(role_number) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/ro_py/groups.py", line 490, in setrole return await self.setrank(rank_role.id) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/ro_py/groups.py", line 464, in setrank "roleId": rank File "/opt/render/project/src/.venv/lib/python3.7/site-packages/ro_py/utilities/requests.py", line 99, in patch return await self.request("patch", *args, **kwargs) File "/opt/render/project/src/.venv/lib/python3.7/site-packages/ro_py/utilities/requests.py", line 78, in request raise request_exception(f"[{this_request.status_code}] {get_request_error[0]['message']}")ro_py.utilities.errors.Unauthorized: [401] Authorization has been denied for this request.
You’re missing the key field.
Hello do you know if Heroku use Procfile , on Render how to run uvicorn?
Heroku does use a Procfile.
I have never used render, but if you have a CLI you can run the command from there. Or if there is a start up command you can edit that.
Yes I already tried that. Yeah I mean heroku’s pretty good, it’s just some people moves because like been months you can’t link github, but if you use CLI it works fine.
Can you tell me how you did it?
Not specifically, I can consider making a guide in future.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.