[Bug]: Minor Bug, YAML -env OCR_OUTPUT_DIRECTORY_YEAR_MONTH=0 is ignored
What were you trying to do?
Updated docker image today jbarlow83/ocrmypdf:latest
and it seems YAML statement
OCR_OUTPUT_DIRECTORY_YEAR_MONTH=0
is no longer respected or syntax has changed. Before update output was posted to :/output now it is posted to :/output/2025/7. I can't say which version exactly was used before, rough timeline would put it at around May 2025.
Complete YAML:
version: "3.3" services: ocrmypdf: restart: unless-stopped container_name: ocrmypdf image: jbarlow83/ocrmypdf:latest volumes: - "/volume1/docker/ocrmypdf/scan2ocr:/input" - "/volume1/docker/ocrmypdf/pfda:/output" - "/volume1/docker/ocrmypdf/originals:/processed" environment: - OCR_ON_SUCCESS_ARCHIVE=1 - OCR_DESKEW=1 - 'OCR_JSON_SETTINGS={"skip-text": true, "l": "deu", "optimize": "1"}' - OCR_OUTPUT_DIRECTORY_YEAR_MONTH=0 user: "1056:108" entrypoint: python3 command: watcher.py
Where are you installing/running from?
Docker container
OCRmyPDF version
ocrmypdf --16.10.2
What operating system are you working on?
No response
Operating system details and version
No response
Simple sanity checks
- [ ] Operating system is currently supported by its vendor (not end of life)
- [ ] Python version is compatible with OCRmyPDF
- [x] This issue is not about a specific input file
Relevant log output
restarting fixed the issue. No idea what happened. closed the issue.
Apparently not. Issues persists. Sorry for flip flopping.
Try OCR_OUTPUT_DIRECTORY_YEAR_MONTH=false
A typing error seems to have crept in. For me it works with OCR_OUTPUT_DIRECTORY_YEAR_MONT=0 The change was between version v16.10.2 to v16.10.4.
Try
OCR_OUTPUT_DIRECTORY_YEAR_MONTH=false
A typing error seems to have crept in. For me it works with
OCR_OUTPUT_DIRECTORY_YEAR_MONT=0The change was between version v16.10.2 to v16.10.4.
Both sugestions are not working for me. What else could i try?
I believe this is an issue in typer - it seems that all environment variables are now truthy, regardless of value, in its interpretation.
Thanks. I think it also affects optimization and causes issues. Just additional information.
I've just run the app again with my specific pdf and above parameters:
Original file: Size: 4.307.001 bytes v16.10.4 output: 4.417.766 bytes (+2.5%) v16.10.2 output: 4.261.261 bytes (-1.0%)
It's a minor change, but it's the difference between compressing and expanding the file size.
@napomat
Both sugestions are not working for me. What else could i try?
My suggestion for now would be or revert to :v16.10.2 instead of using :latest it's what I am doing, v16.10.2 works fine for me, tbh 8)