Skip to content

[BUG] - OCR is not running #307

@lastsign

Description

@lastsign

Description

Hi everyone, I'm wondering why is not running on the server and not unavailable by DEFAULT_OCR_ENDPOINT = "http://127.0.0.1:8000/v2/ai/infer/"

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ptycho/kotaemon/libs/kotaemon/tests/test_table_reader.py", line 56, in <module>
    ocr_reader(fullocr_output())
  File "/home/ptycho/kotaemon/libs/kotaemon/tests/test_table_reader.py", line 34, in ocr_reader
    documents = reader.load_data(input_file)# , response_content=fullocr_output)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ptycho/kotaemon/libs/kotaemon/kotaemon/loaders/ocr_loader.py", line 83, in load_data
    resp = tenacious_api_post(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/ptycho/kotaemon/libs/kotaemon/kotaemon/loaders/ocr_loader.py", line 30, in tenacious_api_post
    resp = requests.post(url=url, files=files, data=data, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ptycho/.cache/pypoetry/virtualenvs/kotaemon-sDjngYLQ-py3.11/lib/python3.11/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ptycho/.cache/pypoetry/virtualenvs/kotaemon-sDjngYLQ-py3.11/lib/python3.11/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ptycho/.cache/pypoetry/virtualenvs/kotaemon-sDjngYLQ-py3.11/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ptycho/.cache/pypoetry/virtualenvs/kotaemon-sDjngYLQ-py3.11/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ptycho/.cache/pypoetry/virtualenvs/kotaemon-sDjngYLQ-py3.11/lib/python3.11/site-packages/requests/adapters.py", line 682, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Browsers

No response

OS

Linux

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions