Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when using uvicorn and fastapi async script #232

Open
kikiraihan opened this issue Nov 25, 2023 · 0 comments
Open

error when using uvicorn and fastapi async script #232

kikiraihan opened this issue Nov 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@kikiraihan
Copy link

kikiraihan commented Nov 25, 2023

🐛 Bug

when i start to use uvicorn and fastapi package to implement async script. I've got error in when import pyrdf2vec. Its because this script in pyrdf2vec/init.py:

*the script------------------
(bypass the asyncio.run error for the Notebooks.)
nest_asyncio.apply()

*the error message------------------
site-packages/pyrdf2vec/init.py", line 6, in
nest_asyncio.apply()
ValueError: Can't patch loop of type <class 'uvloop.Loop'>

Expected Behavior

Nothing should happen, and the package was imported successfully

Current Behavior

An error occurred when importing the package, when using the ASGI Uvicorn server

Steps to Reproduce

i just commented this line in pyrdf2vec/init.py
*the script------------------
(bypass the asyncio.run error for the Notebooks.)
(commented) nest_asyncio.apply()

Environment

  • **MacOs Sonoma 14.0 **
  • **pyRDF2Vec version:0.2.3
  • **Python version:3.10
@kikiraihan kikiraihan added the bug Something isn't working label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant