Export to NM fails with UnboundLocalError
Issue #1015
new
Not yet investigated, but exports to NM on production system currently failing with:
[12/Mar/2024 15:03:25] ERROR [remapp.exports.nm_export:75] Failed to export NM with error:
Traceback (most recent call last):
File "/var/dose/veopenrem3/lib/python3.10/site-packages/openrem/remapp/exports/nm_export.py", line 518, in exportNM2excel
create_summary_sheet(task, data, book, summary, None, False)
File "/var/dose/veopenrem3/lib/python3.10/site-packages/openrem/remapp/exports/export_common.py", line 880, in create_summary_sheet
for x in sorted_protocols
UnboundLocalError: local variable 'sorted_protocols' referenced before assignment
Comments (1)
-
reporter - Log in to comment
sorted_protocols
is called on line 880 of export_common, in thecreate_summary_sheet
routine,if enable_standard_names
isTrue
.However, it is only assigned
if has_series_protocol
istrue
on line 839 of the same function.When
create_summary_sheet
is called fromexportNM2excel
innm_export
,has_series_protocol
is set toFalse
. Therefore it appears that this can never work.