Find answers from the community

Updated 3 months ago

Hi! I'm trying to use LlamaParse the

Hi! I'm trying to use LlamaParse the following way:

1) Writing my code on front-end library CodeMirror. This code contains LlamaParse stuff (reading files using SimpleDirectoryReader etc.
2) Then I send that text to FastAPI backend and call exec() function to perform pdf parsing

I was getting a warning from LlamaParse telling that I need to use nest_asyncio.apply(). I did it, and now I am getting this:

Plain Text
  File "/home/ali/AI/nexus/llm-topic-modelling/venv/lib/python3.10/site-packages/nest_asyncio.py", line 193, in _patch_loop
    raise ValueError('Can\'t patch loop of type %s' % type(loop))
ValueError: Can't patch loop of type <class 'uvloop.Loop'>


Any ideas on how to fix this?
L
2 comments
uvicorn.run(..., loop="asyncio")
You might need need nest_asyncio if you are using all the async endpoints (which definitely do that, if you are running in fastapi)
Add a reply
Sign up and join the conversation on Discord