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

failure in FV2504: cannot access local variable 'latest_file' where it is not associated with a value #145

Closed
hf-kklein opened this issue Sep 3, 2024 · 0 comments · Fixed by #146

Comments

@hf-kklein
Copy link
Contributor

caused by #144
https://github.com/Hochfrequenz/edi_energy_mirror/actions/runs/10676486314/job/29590112417

edi_energy_mirror/edi_energy_mirror/edi_energy_de/FV2504/UTILTSMIG-informatorischeLesefassung1.1d_99991231_20250404.docx
2024-09-03 04:32:20.842 | WARNING | migmose.parsing:find_file_to_format:40 - ⚠️ No file found for UTILMDG
2024-09-03 04:32:20.843 | ERROR | migmose.parsing:get_latest_file:97 - Error processing file list: max() iterable argument is empty
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.5/x64/bin/migmose", line 8, in
sys.exit(main())
^^^^^^
File "/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/migmose/main.py", line 88, in main
dict_files = find_file_to_format(message_format, edi_energy_mirror_path, format_version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/migmose/parsing.py", line 42, in find_file_to_format
file_dict[message_format] = get_latest_file(all_file_dict[message_format])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/migmose/parsing.py", line 99, in get_latest_file
logger.info("Using the latest file: {}", latest_file)
^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'latest_file' where it is not associated with a value

@DeltaDaniel DeltaDaniel linked a pull request Sep 3, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant