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

Error in create_nachrichtenstruktur_tabelle(raw_lines): "String should match pattern '^\d{5}$' [type=string_pattern_mismatch, input_value='C0001', input_type=str]" #122

Closed
hf-kklein opened this issue Jul 30, 2024 · 1 comment · Fixed by #125
Assignees

Comments

@hf-kklein
Copy link
Contributor

Problems started with this commit:
Hochfrequenz/edi_energy_mirror@f94e509

https://github.com/Hochfrequenz/edi_energy_mirror/actions/runs/10156357397/job/28084624773

Run migmose -eemp ./edi_energy_mirror -o ./machine-readable_message-implementation-guide -fv FV2210 --file-type csv --file-type nested_json --file-type reduced_nested_json
migmose -eemp ./edi_energy_mirror -o ./machine-readable_message-implementation-guide -fv FV2210 --file-type csv --file-type nested_json --file-type reduced_nested_json
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
2024-07-30 04:55:37.615 | WARNING | migmose.parsing:find_file_to_format:39 - ⚠️ No file found for COMDIS.
2024-07-30 04:55:37.622 | WARNING | migmose.parsing:find_file_to_format:39 - ⚠️ No file found for ORDCHG.
2024-07-30 04:55:37.627 | WARNING | migmose.parsing:find_file_to_format:39 - ⚠️ No file found for QUOTES.
2024-07-30 04:55:37.629 | WARNING | migmose.parsing:find_file_to_format:39 - ⚠️ No file found for REQOTE.
2024-07-30 04:55:37.633 | WARNING | migmose.parsing:find_file_to_format:39 - ⚠️ No file found for UTILMDG.
2024-07-30 04:55:37.634 | WARNING | migmose.parsing:find_file_to_format:39 - ⚠️ No file found for UTILMDS.
2024-07-30 04:55:37.635 | WARNING | migmose.parsing:find_file_to_format:39 - ⚠️ No file found for UTILMDW.
2024-07-30 04:55:37.789 | INFO | migmose.main:main:89 - 💾 Saving flat Nachrichtenstruktur table for APERAK and FV2210 as csv to machine-readable_message-implementation-guide/FV2210/APERAK.
2024-07-30 04:55:37.790 | INFO | migmose.mig.nachrichtenstrukturtabelle:to_csv:45 - Wrote Nachrichtenstruktur for APERAK to machine-readable_message-implementation-guide/FV2210/APERAK/nachrichtenstruktur.csv
2024-07-30 04:55:37.790 | INFO | migmose.main:main:101 - 💾 Saving nested Nachrichtenstruktur for APERAK and FV2210 as json to machine-readable_message-implementation-guide/FV2210/APERAK.
2024-07-30 04:55:37.791 | INFO | migmose.mig.nestednachrichtenstruktur:to_json:116 - Wrote nested Nachrichtenstruktur for APERAK to machine-readable_message-implementation-guide/FV2210/APERAK/nested_nachrichtenstruktur.json
2024-07-30 04:55:37.791 | INFO | migmose.mig.reducednestednachrichtenstruktur:_process_segmentgruppen:74 - Added ('0090', 'SG2') with 2 segments at depth 0.
2024-07-30 04:55:37.792 | INFO | migmose.mig.reducednestednachrichtenstruktur:_process_segmentgruppen:74 - Added ('0120', 'SG3') with 3 segments at depth 0.
2024-07-30 04:55:37.792 | INFO | migmose.mig.reducednestednachrichtenstruktur:_process_segmentgruppen:74 - Added ('0190', 'SG5') with 2 segments at depth 1.
2024-07-30 04:55:37.792 | INFO | migmose.mig.reducednestednachrichtenstruktur:_process_segmentgruppen:74 - Added ('0160', 'SG4') with 2 segments at depth 0.
2024-07-30 04:55:37.792 | INFO | migmose.main:main:117 - 💾 Saving reduced nested Nachrichtenstruktur for APERAK and FV2210 as json to machine-readable_message-implementation-guide/FV2210/APERAK.
2024-07-30 04:55:37.793 | INFO | migmose.mig.reducednestednachrichtenstruktur:to_json:150 - Wrote reduced nested Nachrichtenstruktur for APERAK to machine-readable_message-implementation-guide/FV2210/APERAK/reduced_nested_nachrichtenstruktur.json
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.4/x64/bin/migmose", line 8, in
sys.exit(main())
^^^^^^
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 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/migmose/main.py", line 87, in main
nachrichtenstrukturtabelle = NachrichtenstrukturTabelle.create_nachrichtenstruktur_tabelle(raw_lines)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/migmose/mig/nachrichtenstrukturtabelle.py", line 30, in create_nachrichtenstruktur_tabelle
collected_lines.append(NachrichtenstrukturZeile.init_raw_lines(raw_line))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/migmose/mig/nachrichtenstrukturzeile.py", line 63, in init_raw_lines
return cls(**field_dict)
^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/pydantic/main.py", line 193, in init
self.pydantic_validator.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for NachrichtenstrukturZeile
nr
String should match pattern '^\d{5}$' [type=string_pattern_mismatch, input_value='C0001', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/string_pattern_mismatch
Error: Process completed with exit code 1.

hf-kklein added a commit that referenced this issue Jul 30, 2024
außerordentlicheVeröffenltichung should match Außerordentliche Veröffentlichtung
relates to Hochfrequenz/kohlrahbi#382
and is probably relaed to #122
@DeltaDaniel
Copy link
Contributor

In CONTRLMIG there are new numbers defining a Nachrichtenstrukturzeile
grafik

DeltaDaniel pushed a commit that referenced this issue Jul 30, 2024
außerordentlicheVeröffenltichung should match Außerordentliche Veröffentlichtung
relates to Hochfrequenz/kohlrahbi#382
and is probably relaed to #122
@DeltaDaniel DeltaDaniel linked a pull request Jul 30, 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.

2 participants