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

docxfilefinder most_recent_file=max(...) fails since most recent edi-energy.de changes for FV2310: ValueError: max() iterable argument is empty #381

Closed
hf-kklein opened this issue Jul 29, 2024 · 1 comment · Fixed by #382
Assignees
Labels
bug Something isn't working

Comments

@hf-kklein
Copy link
Contributor

https://github.com/Hochfrequenz/edi_energy_mirror/actions/runs/10139837418/job/28033865960#step:7:59

kohlrahbi ahb --assume-yes --edi-energy-mirror-path edi_energy_mirror --output-path ./machine-readable_anwendungshandbuecher/FV2310 --format-version FV2310 --file-type flatahb --file-type csv --file-type xlsx
kohlrahbi conditions --assume-yes --edi-energy-mirror-path edi_energy_mirror --output-path ./edi_energy_ahb_conditions_and_packages/FV2310 --format-version FV2310
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.12.4/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.4/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.4/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.4/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.4/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.4/x64/lib
DEBUG [kohlrahbi] Ignoring file COMDISAHB-informatorischeLesefassung1.0d_20240402_20231001.docx
DEBUG [kohlrahbi] Ignoring file HerkunftsnachweisregisterAHB-informatorischeLesefassung2.3c_20240402_20231001.docx
DEBUG [kohlrahbi] Ignoring file IFTSTAAHB-informatorischeLesefassung2.0e_20240725_20231001.docx
DEBUG [kohlrahbi] Ignoring file IFTSTAAHB-informatorischeLesefassung2.0e-AußerordentlicheVeröffentlichung_20231211_20231001.docx
DEBUG [kohlrahbi] Ignoring file IFTSTAAHB-informatorischeLesefassung2.0e-außerordentlicheVeröffentlichung_20250403_20240311.docx
DEBUG [kohlrahbi] Ignoring file IFTSTAAHB-informatorischeLesefassung2.0eKonsolidierteLesefassungmitFehlerkorrekturenStand12.12.2023_20240310_20231212.docx
DEBUG [kohlrahbi] Ignoring file INVOICREMADVAHB-informatorischeLesefassung2.5b_20240402_20231001.docx
DEBUG [kohlrahbi] Ignoring file INVOICREMADVAHB-informatorischeLesefassung2.5bKonsolidierteLesefassungmitFehlerkorrekturenStand20.07.2023_20231022_20231001.docx
DEBUG [kohlrahbi] Ignoring file MSCONSAHB-informatorischeLesefassung3.1c_20240402_20231001.docx
DEBUG [kohlrahbi] Ignoring file MSCONSAHB-informatorischeLesefassung3.1cKonsolidierteLesefassungmitFehlerkorrekturenStand29.09.2023_20231211_20231001.docx
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.4/x64/bin/kohlrahbi", line 8, in
sys.exit(cli())
^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/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.4/x64/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/kohlrahbi/ahb/command.py", line 109, in ahb
scrape_pruefis(
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/kohlrahbi/ahb/init.py", line 231, in scrape_pruefis
pruefi_to_file_mapping = get_pruefi_to_file_mapping(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/kohlrahbi/ahb/init.py", line 209, in get_pruefi_to_file_mapping
pruefi_to_file_mapping = find_pruefidentifikatoren(path_to_docx_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/kohlrahbi/ahb/init.py", line 139, in find_pruefidentifikatoren
ahb_file_finder.filter_for_latest_ahb_docx_files()
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/kohlrahbi/docxfilefinder.py", line 50, in filter_for_latest_ahb_docx_files
self.paths_to_docx_files = self.filter_latest_version(grouped_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/kohlrahbi/docxfilefinder.py", line 115, in filter_latest_version
most_recent_file = max(
^^^^
ValueError: max() iterable argument is empty

the changes which caused the problem: Hochfrequenz/edi_energy_mirror@f94e509 (in the previous commit the CI was still green)

@hf-kklein hf-kklein added the bug Something isn't working label Jul 29, 2024
@DeltaDaniel
Copy link
Collaborator

here we filter for "konsilidierte Lesefassung mit Fehlerkorrekturen" and for "außerordentliche Veröffentlichungen". Newer releases changed to camelcase names. We filter now by ignoring the capitalization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants