Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AlternativeImage selection glitch #50

Open
bertsky opened this issue Aug 12, 2022 · 0 comments
Open

AlternativeImage selection glitch #50

bertsky opened this issue Aug 12, 2022 · 0 comments

Comments

@bertsky
Copy link
Contributor

bertsky commented Aug 12, 2022

Since the recent changes regarding image selection, I am getting the following:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/ocrd_browser/model/page.py", line 102, in get_image
    page_image, page_coords, page_image_info = ws.image_from_page(self.page, self.id, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/ocrd/workspace.py", line 730, in image_from_page
    filename, page_id))
Exception: Found no AlternativeImage that satisfies all requirements filename="." in page "PHYS_0001"

This goes away when I explicitly select an image version in the feature configurator. So the problem is the initialization.

I believe the cause is in b19ae33, where view.page.ImageVersion.list_from_page will serialize an uninitialized pathlib.Path (which happens to be . as str) instead of the empty string or None (which would have worked with the existing code in ImageVersionSelector and ViewPage).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant