Skip to content

ext/arabic_rom dependencies not installed in the Docker image #301

Description

@kirkhess

Arabic script-to-Roman returns 500 on all input: ext/arabic_rom dependencies not installed in the Docker image

Summary

In lcnetdev/scriptshifter:latest, the arabic table advertises "has_s2r": true
but every script-to-Roman request returns HTTP 500, including a single ASCII
character. Roman-to-script on the same table works.

Root cause: funcy, pymarc and repackage are commented out in requirements.txt:

#funcy>=1.15,<2
#pymarc>=4.0,<5
...
#repackage>=0.7.3

Reproduction

docker run -d --rm -p 8000:8000 -e TXL_FLASK_SECRET=x lcnetdev/scriptshifter:latest

curl -s -X POST http://localhost:8000/trans \
  -H 'Content-Type: application/json' \
  -d '{"lang":"arabic","text":"محمد","t_dir":"s2r"}'

Response (HTTP 500):

{"output":"","warnings":["An internal error occurred.","If the error persists, contact the technical support team."]}

The same request with "text":"a" also returns 500, so it is not input
dependent. Roman-to-script on the same table succeeds:

curl -s -X POST http://localhost:8000/trans \
  -H 'Content-Type: application/json' \
  -d '{"lang":"arabic","text":"kitab","t_dir":"r2s"}'
# {"output":"كتب","warnings":[]}

GET /languages reports the table as supporting both directions:

"arabic": {
  "label": "Arabic",
  "marc_code": "ara",
  "has_r2s": true,
  "has_s2r": true,
  "description": "Arabic-to-Roman transliterator using the ArabicTransliterator external library.\n"
}

Fix

Installing the three missing packages resolves it completely:

docker exec <container> pip install funcy==1.15 "repackage>=0.7.3" "pymarc>=4.0.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions