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

Unnamed exception occurs during document ingestion #1675

Open
abylikhsanov opened this issue Dec 9, 2024 · 1 comment
Open

Unnamed exception occurs during document ingestion #1675

abylikhsanov opened this issue Dec 9, 2024 · 1 comment

Comments

@abylikhsanov
Copy link

Describe the bug
During CLI document ingestion command (document ingest DOC) happens the following exception without a description:

CLI error: An error occurred
Traceback (most recent call last):
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpx/_transports/default.py", line 72, in map_httpcore_exceptions
    yield
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpx/_transports/default.py", line 377, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 256, in handle_async_request
    raise exc from None
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 236, in handle_async_request
    response = await connection.handle_async_request(
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpcore/_async/connection.py", line 103, in handle_async_request
    return await self._connection.handle_async_request(request)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpcore/_async/http11.py", line 136, in handle_async_request
    raise exc
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpcore/_async/http11.py", line 106, in handle_async_request
    ) = await self._receive_response_headers(**kwargs)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpcore/_async/http11.py", line 177, in _receive_response_headers
    event = await self._receive_event(timeout=timeout)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpcore/_async/http11.py", line 217, in _receive_event
    data = await self._network_stream.read(
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpcore/_backends/anyio.py", line 32, in read
    with map_exceptions(exc_map):
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ReadTimeout

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/sdk/async_client.py", line 71, in _make_request
    response = await self.client.request(method, url, **request_args)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpx/_client.py", line 1702, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpx/_client.py", line 1739, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpx/_client.py", line 1776, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpx/_transports/default.py", line 376, in handle_async_request
    with map_httpcore_exceptions():
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/httpx/_transports/default.py", line 89, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ReadTimeout

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/abyl/Documents/r2r/r2r_env/bin/r2r", line 8, in <module>
    sys.exit(main())
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/cli/main.py", line 52, in main
    raise e
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/cli/main.py", line 45, in main
    cli()
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/asyncclick/core.py", line 1205, in __call__
    return anyio.run(self._main, main, args, kwargs, **opts)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/anyio/_core/_eventloop.py", line 74, in run
    return async_backend.run(func, args, {}, backend_options)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2347, in run
    return runner.run(wrapper())
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 218, in run
    return self._loop.run_until_complete(task)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2335, in wrapper
    return await func(*args)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/asyncclick/core.py", line 1208, in _main
    return await main(*args, **kwargs)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/asyncclick/core.py", line 1120, in main
    rv = await self.invoke(ctx)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/asyncclick/core.py", line 1739, in invoke
    return await _process_result(await sub_ctx.command.invoke(sub_ctx))
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/asyncclick/core.py", line 1739, in invoke
    return await _process_result(await sub_ctx.command.invoke(sub_ctx))
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/asyncclick/core.py", line 1485, in invoke
    return await ctx.invoke(self.callback, **ctx.params)
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/asyncclick/core.py", line 824, in invoke
    rv = await rv
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/cli/commands/documents.py", line 50, in create
    response = await client.documents.create(
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/sdk/v3/documents.py", line 92, in create
    result = await self.client._make_request(
  File "/home/abyl/Documents/r2r/r2r_env/lib/python3.10/site-packages/sdk/async_client.py", line 75, in _make_request
    raise R2RException(
shared.abstractions.exception.R2RException: Request failed:

To Reproduce
Steps to reproduce the behavior:

  1. Pick a large document (400mb in this example)
  2. Use a local deployment with postgres connection
  3. Try "document ingest DOC" and wait for 2-3 minutes to get the exception

Desktop (please complete the following information):

  • Local deployment on Ubuntu 22.04
@emrgnt-cmplxty
Copy link
Contributor

Are you running with a synchronous document ingestion? This appears to be a request timeout.

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