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

Future pending cb=[ _chain_future.<locals>._call_check_cancel() ] when using python #1506

Open
piobogiwo opened this issue Oct 27, 2024 · 1 comment

Comments

@piobogiwo
Copy link

When calling a r2r we get : Future pending cb=[ _chain_future.._call_check_cancel() ]
(regardles if run in a docker or by plain r2r serve) from jupyter notebook (tried all: windows 11 native and ubuntu-wsl, installed in conda/pyenv environment)
Similar if docker is switched off.
The same reaction when calling:

  • client.list_collections()
  • client.documents_overview()
  • client.ingest_files([temp_file_path])

When calling just : client
Response is: <sdk.sync_client.R2RClient at 0x131a9561bb0>

r2r is running well in a docker and dashboard can be accessed, but connection via python is hanging.

@NolanTrem
Copy link
Collaborator

Did some digging into this and it looks like Jupyter notebooks are running an event loop in the background.

The sync client is wrapping the async, and attempts to get the running loop. Since Jupyter is running one, this is what it's getting. I'm going to look into how we might address this, but for the time being, if you use the AsyncClient it will function correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants