Resource resolving not working for $PWD/ocrd-resources
See original GitHub issueI have (due to some quick hack to check something) my models in a directory $PWD/ocrd-resources
, according to the docs:
ocrd-resources
ocrd-resources/ocrd-calamari-recognize
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/3.ckpt.json
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/4.ckpt.h5
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/1.ckpt.h5
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/0.ckpt.h5
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/2.ckpt.json
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/2.ckpt.h5
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/4.ckpt.json
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/1.ckpt.json
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/0.ckpt.json
ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0/3.ckpt.h5
ocrd-calamari-recognize
fails to find these:
15:23:53.051 ERROR ocrd.ocrd-calamari-recognize.resolve_resource - Could not find resource 'qurator-gt4histocr-1.0' for executable 'ocrd-calamari-recognize'. Try 'ocrd resmgr download ocrd-calamari-recognize qurator-gt4histocr-1.0' to download this resource.
I believe that the code at https://github.com/OCR-D/core/blob/d4a853964ce468a2c0eb6be2004c15441fbd206f/ocrd_utils/ocrd_utils/os.py#L68 should read:
candidates.append(join(cwd, 'ocrd-resources', executable, fname)) # Added 'ocrd-resources', executable
I’m not submitting a PR because I don’t know if there are other reasons for leaving out 'ocrd-resources', executable
here.
(If I’m putting the models into qurator-gt4histocr-1.0
instead of ocrd-resources/ocrd-calamari-recognize/qurator-gt4histocr-1.0
, it works.)
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Solved: AEM 6.4 - Not able to access resource with below r...
This issue is related to get a resource with the help of system user ("someuser") having all permissions given to that user in...
Read more >AEM resource resolver failing - sling - Stack Overflow
It looks like your configuration only affects resource resolution and not the outgoing mapping. The rule will be applied for incoming requests ...
Read more >"cannot set user id: Resource temporarily unavailable" while ...
"cannot set user id: Resource temporarily unavailable" while trying to login or su as a local user in Red Hat Enterprise Linux.
Read more >Cannot resolve variable at "provider.stage": Value not found at ...
When we are running the application the serverless file cant take the value from .env file. Taking out that flag(--env) it is running...
Read more >Cannot create or start container instance (service unavailable)
Manually restarting the container instances did not work, ... network vnet show --resource-group $APP_RES_GROUP --name $VNET_NAME --query id ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, there was an issue with the publishing workflow for the specs, has been fixed and site has been updated.
done
Indeed: that’s still the old version. https://github.com/OCR-D/spec/blob/master/ocrd_tool.md#file-parameters has it right, so the website needs to be updated. (And we should probably notify users via Gitter, even if the implemented behaviour has not changed.)