You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
After installing an additional OCR language (for example, Japanese) as described in the docs, the additional language can be used in OCR by setting it as the default, but it cannot be used from the web UI because the backend rejects it as an invalid value.
Expected
Additionally installed languages should be usable from web UI, just like the default languages.
Actual
The additional language shows up in the language selection dropdown for running OCR:
But when you click "Start", the backend responds with a 422 error saying the additional language is not an allowed value for the enum.
Additionally, the UI completely ignores this error and doesn't show any error message :(
Full error payload:
{
"detail": [
{
"type": "enum",
"loc": [
"body",
"lang"
],
"msg": "Input should be 'deu','fra','eng','ita','spa','por' or 'ron'",
"input": "jpn",
"ctx": {
"expected": "'deu','fra','eng','ita','spa','por' or 'ron'"
}
}
]
}
Description
After installing an additional OCR language (for example, Japanese) as described in the docs, the additional language can be used in OCR by setting it as the default, but it cannot be used from the web UI because the backend rejects it as an invalid value.
Expected
Additionally installed languages should be usable from web UI, just like the default languages.
Actual
![CleanShot 2023-12-31 at 17 12 25@2x](https://private-user-images.githubusercontent.com/1099818/293496180-85fb3675-8313-4afc-a24a-62b5b52061d7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5Nzg5OTAsIm5iZiI6MTcxOTk3ODY5MCwicGF0aCI6Ii8xMDk5ODE4LzI5MzQ5NjE4MC04NWZiMzY3NS04MzEzLTRhZmMtYTI0YS02MmI1YjUyMDYxZDcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMDM1MTMwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZmVkZjczYmFlOTIwODdkZDE0OGZmZTk0NTI0YzEwMGQ1YmU0ZjNjZTM4NTRmZTI3MzU4MDllMWNkMzZmZmM0NyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.MxqHg-x-DoQJrsnUJJytPcXZc-Nv_nY36HwhQHrNuLU)
The additional language shows up in the language selection dropdown for running OCR:
But when you click "Start", the backend responds with a 422 error saying the additional language is not an allowed value for the enum.
Additionally, the UI completely ignores this error and doesn't show any error message :(
Full error payload:
Browser console screenshot:
![CleanShot 2023-12-31 at 17 12 41@2x](https://private-user-images.githubusercontent.com/1099818/293496182-aa846a18-aa31-4bc2-8449-f72a609b7c82.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5Nzg5OTAsIm5iZiI6MTcxOTk3ODY5MCwicGF0aCI6Ii8xMDk5ODE4LzI5MzQ5NjE4Mi1hYTg0NmExOC1hYTMxLTRiYzItODQ0OS1mNzJhNjA5YjdjODIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMDM1MTMwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGFjNWVkNjE5NTAyNWM1YmZlZmExOGZhYWM3N2U4ZTEzOTg2ZjQ5NWM4YzY4NzIxMTYwOGQwZGYzMGI5OTUyOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.3QwhM-gZG9A_tCcADhbeODArAn70f6rkIbxXzZaBTyc)
Info:
More info about setup:
Using custom docker image with Japanese language package for tesseract installed, following instructions: https://docs.papermerge.io/3.0/setup/add-ocr-langs/
Dockerfile:
Built with:
docker build -t mypaper:3.0 -f Dockerfile .
Using Docker Compose, following instructions: https://docs.papermerge.io/3.0/setup/docker-compose/
mypaper:3.0
)PAPERMERGE__OCR__DEFAULT_LANGUAGE: jpn
The text was updated successfully, but these errors were encountered: