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"
Arabic script-to-Roman returns 500 on all input:
ext/arabic_romdependencies not installed in the Docker imageSummary
In
lcnetdev/scriptshifter:latest, thearabictable advertises"has_s2r": truebut 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
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 inputdependent. Roman-to-script on the same table succeeds:
GET /languagesreports the table as supporting both directions:Fix
Installing the three missing packages resolves it completely: