Skip to content

Commit

Permalink
run_processor: handle frozendict or empty parameter in profile log
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Feb 17, 2025
1 parent ee24a3e commit ec9cd01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ocrd/processor/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def run_processor(
t1_cpu,
processor.input_file_grp or '',
processor.output_file_grp or '',
json.dumps(processor.parameter) or '',
json.dumps(dict(processor.parameter or {})),
processor.page_id or ''
)
workspace.mets.add_agent(
Expand All @@ -154,7 +154,7 @@ def run_processor(
otherrole=otherrole,
notes=[({'option': 'input-file-grp'}, processor.input_file_grp or ''),
({'option': 'output-file-grp'}, processor.output_file_grp or ''),
({'option': 'parameter'}, json.dumps(processor.parameter or '')),
({'option': 'parameter'}, json.dumps(dict(processor.parameter or {}))),
({'option': 'page-id'}, processor.page_id or '')]
)
workspace.save_mets()
Expand Down

0 comments on commit ec9cd01

Please sign in to comment.