Open sigridjineth opened 1 month ago
Hi @sigridjineth, we have a fix for this error in 0.25.2. Can you upgrade and confirm that this fixes the issue? Unfortunately the solution right now is to fall back to non splitting mode in a uvloop context, but at least we can prevent the error. Stay tuned for a better fix for splitting large pdfs in a nested event loop context.
@awalker4 thanks for checking it out!
Here's the GitHub issue formatted as requested:
Describe the bug When attempting to use the
UnstructuredClient
to parse a PDF document, aValueError
is thrown due to an incompatibility withuvloop
. This occurs when initializing theSplitPdfHook
in theUnstructuredClient
. The error suggests thatnest_asyncio
is unable to patch theuvloop.Loop
.The version that I am using.
To Reproduce
Expected behavior The
UnstructuredClient
should initialize successfully and be able to parse the PDF document without throwing aValueError
related touvloop
.Environment Info
Note: As I don't have access to run this script, please run it in your environment and paste the output here.
Additional context
This indicates that the
SplitPdfHook
is trying to applynest_asyncio
, which is incompatible withuvloop
.Traceback
Any guidance on resolving this issue or workarounds would be greatly appreciated.