mirror of
https://github.com/qurator-spk/modstool.git
synced 2025-06-26 20:19:56 +02:00
🐛 mods4pandas: Handle multivolume_work without structMap TYPE='PHYSICAL'
This commit is contained in:
parent
0acaa83163
commit
6226618f40
3 changed files with 127 additions and 1 deletions
|
@ -270,7 +270,11 @@ def pages_to_dict(mets, raise_errors=True) -> List[Dict]:
|
|||
structMap_LOGICAL = mets.find('./mets:structMap[@TYPE="LOGICAL"]', ns)
|
||||
fileSec = mets.find('./mets:fileSec', ns)
|
||||
if structMap_PHYSICAL is None:
|
||||
raise ValueError("No structMap[@TYPE='PHYSICAL'] found")
|
||||
# This is expected in a multivolume work!
|
||||
if structMap_LOGICAL.find('./mets:div[@TYPE="multivolume_work"]', ns) is not None:
|
||||
return []
|
||||
else:
|
||||
raise ValueError("No structMap[@TYPE='PHYSICAL'] found (but not a multivolume work)")
|
||||
if structMap_LOGICAL is None:
|
||||
raise ValueError("No structMap[@TYPE='LOGICAL'] found")
|
||||
if fileSec is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue