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

[BUG] - OCR is not running #307

Closed
lastsign opened this issue Sep 18, 2024 · 2 comments
Closed

[BUG] - OCR is not running #307

lastsign opened this issue Sep 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@lastsign
Copy link

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

@lastsign lastsign added the bug Something isn't working label Sep 18, 2024
@phv2312
Copy link
Contributor

phv2312 commented Oct 3, 2024

Hi, the OCR loader is not working because it requires the 3rd service to run on beforehand.
Recently, we have pushed the new PR which integrate the GOT-OCR 2.0 for image reader.
Can you try it out ? PR

@lastsign
Copy link
Author

lastsign commented Oct 3, 2024

Hi, the OCR loader is not working because it requires the 3rd service to run on beforehand. Recently, we have pushed the new PR which integrate the GOT-OCR 2.0 for image reader. Can you try it out ? PR

Hi, no i didn't.
I mean this app install dependencies for Tesseract. I was thinking It should work local without 3rd service to run.

I've tried implement via tesseract but without 'strong table oriented'.
So that works for me.

I'll check it out PR, thanks

@phv2312 phv2312 closed this as completed Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants