Replies: 5 comments 4 replies
|
Hi Tigran, This kind of error can happen in some situations where several loops are running, like in unit tests for example. I'm surprised you get this using the full example. Would you mind sharing your code so we can check if there is something wrong? And also give us the command you use to run Uvicorn? For the record, I've setup a working Repl.it using the full example: https://replit.com/@frankie567/fastapi-users-mongodb |
|
Hello! i am having the same error but in this project i can run it in local with uvicron but when i run in a container using gunicorn it shows up :(
dockerfile: `FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7 ADD . /app EXPOSE 8080` main.py: `import os if name == 'main': I also share the dockerfile and the main.py and finally comment that I was trying python 3.7 and 3.9 and I get the same thing. Greetings and thanks Victor PS: I am connected to a database in mongodb atlas |
|
@victorgerardodominguez did you find any solution on your problem? I have the same error on a server using nginx and guvicorn. |
|
The issue could also be creating |
|
I am also facing same problems while storing data in the mongo @tigrankh @frankie567 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Thanks for all the work on fastapi-users.
I'm just starting with it, but the road began kind of bumpy :/
I'm running the Full Example posted in the docs and just added a uvicorn to run the app.
when sending a request to auth/jwt/login I get this error:
RuntimeError: Task <Task pending name='Task-15' coro=<RequestResponseCycle.run_asgi() running at /Users/tigrankhazhakyan/dev/playground/fastapi-users/venv/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py:369> cb=[set.discard()]> got Future <Future pending cb=[_chain_future.<locals>._call_check_cancel() at /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/futures.py:360]> attached to a different loopThe error is thrown when awaiting for get_by_email() method
the thing is that I don't explicitly create new loops, so the only existing loop I assume should be the main one.
I tried adding my own loop to motor class constructor, but it didn't change anything.
Can you please help?
Thanks,
Tigran
All reactions