Skip to content

error when using uvicorn and fastapi async script聽#232

Description

@kikiraihan

馃悰 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions