| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
We're now using asyncio for page split concurrency, but because the client itself is not async, we need to manage our own event loop. This complains if your environment already has a running event loop. For instance, setting `split_pdf_page=True` in a jupyter cell will give you `RuntimeError: This event loop is already running`. Turns out there's a simple library to allow for nested event loops. We just apply the monkeypatch in split_pdf_hook.py and the error goes away. To verify, you'll need to run `pip install -e .` to install the local version of the client. Run `make run-jupyter` and open up the sample notebook in `_jupyter/`. Try making a request with page splitting enabled and you'll see the above error. Then, check out this branch, install locally again, restart your jupyter kernel, and the error is fixed.
There was a problem hiding this comment.
with a pin that this is only a temporary solution since this dep is an archived repo
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
We're now using asyncio for page split concurrency, but because the client itself is not async, we need to manage our own event loop. This complains if your environment already has a running event loop. For instance, setting split_pdf_page=True in a jupyter cell will give you RuntimeError: This event loop is already running.
Turns out there's a simple library to allow for nested event loops. We just apply the monkeypatch in split_pdf_hook.py and the error goes away.
To verify, you'll need to install the current client on main, test in jupyter, then install on this branch and verify the error is gone.