Closed stweil closed 4 years ago
Sorry, I should have tested better. I used set
to get a unique list of parents for regions here, but top-level PageType
does not support being put into a set or dict because it does not support __hash__
(yet).
@kba I think we could easily fix this by extending ocrd_models.ocrd_page_user_methods.__hash__
such that for PageType
it does not try to use .id
but .pcGtsId
(or by amending PageType
directly with an id
property equivalent to pcGtsId
).
@kba I think we could easily fix this by extending ocrd_models.ocrd_page_user_methods.hash such that for PageType it does not try to use .id but .pcGtsId (or by amending PageType directly with an id property equivalent
On it.
@kba I think we could easily fix this by extending ocrd_models.ocrd_page_user_methods.hash such that for PageType it does not try to use .id but .pcGtsId (or by amending PageType directly with an id property equivalent
https://github.com/OCR-D/core/pull/610 For PageType, uses imageFilename
as the hashable attribute, pcGtsId
for PcGtsType, id
when available and alternatively raise an exception that this element is unhashable.
Log output: