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 when parsing Odx-d containing DOPs #338

Open
Sheero-git opened this issue Sep 4, 2024 · 1 comment
Open

Error when parsing Odx-d containing DOPs #338

Sheero-git opened this issue Sep 4, 2024 · 1 comment

Comments

@Sheero-git
Copy link

My ODX file surely contains TEXTTABLE compu methods, yet for some reason I am getting an error that TEXTTABLE compu method must exhibit a COMPU-INTERNAL-TO-PHYS subtag

Any idea what to do?

Here is the log
python3 -m odxtools list -a "odxtools\source.pdx"
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "_main
.py", line 6, in
main()
File "_init
.py", line 80, in _main
_main.start_cli()
File "\cli\main.py", line 67, in start_cli
tool.run(args)
File "\cli\list.py", line 216, in run
odxdb = _parser_utils.load_file(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\cli_parser_utils.py", line 35, in load_file
return _load_file(pdx_file_name)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "\odxtools\loadfile.py", line 26, in load_file
return load_pdx_file(str(file_name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\odxtools\loadfile.py", line 11, in load_pdx_file
db.add_pdx_file(str(pdx_file))
File "\odxtools\database.py", line 56, in add_pdx_file
self._process_xml_tree(root)
File "\odxtools\database.py", line 86, in _process_xml_tree
dlcs.append(DiagLayerContainer.from_et(dlc, []))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "odxtools\diaglayercontainer.py", line 68, in from_et
ecu_shared_datas = NamedItemList([
^
File "\odxtools\diaglayercontainer.py", line 69, in
EcuSharedData.from_et(dl_element, doc_frags)
File "odxtools\diaglayers\ecushareddata.py", line 44, in from_et
ecu_shared_data_raw = EcuSharedDataRaw.from_et(et_element, doc_frags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "odxtools\diaglayers\ecushareddataraw.py", line 31, in from_et
kwargs = dataclass_fields_asdict(DiagLayerRaw.from_et(et_element, doc_frags))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\odxtools\diaglayers\diaglayerraw.py", line 101, in from_et
diag_data_dictionary_spec = DiagDataDictionarySpec.from_et(ddds_elem, doc_frags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\odxtools\diagdatadictionaryspec.py", line 80, in from_et
data_object_props = [
^
File "odxtools\diagdatadictionaryspec.py", line 81, in
DataObjectProperty.from_et(dop_element, doc_frags)
File "\odxtools\dataobjectproperty.py", line 57, in from_et
compu_method = create_any_compu_method_from_et(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\odxtools\compumethods\createanycompumethod.py", line 31, in create_any_compu_method_from_et
return TexttableCompuMethod.compu_method_from_et(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\odxtools\compumethods\texttablecompumethod.py", line 31, in compu_method_from_et
return TexttableCompuMethod(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 8, in init
File "\odxtools\compumethods\texttablecompumethod.py", line 46, in post_init
odxraise("TEXTTABLE compu methods must exhibit a COMPU-INTERNAL-TO-PHYS subtag.")
File "\odxtools\exceptions.py", line 50, in odxraise
raise error_type(message)
odxtools.exceptions.OdxError: TEXTTABLE compu methods must exhibit a COMPU-INTERNAL-TO-PHYS subtag.

@andlaus
Copy link
Collaborator

andlaus commented Sep 5, 2024

It seems like your dataset contains a texttable that does not specify any mapping from internal to physical values. This is explictly forbidden by the ODX standard (cf. checker rule 64 in section B.2). If you want a "pass through" compu method, change the CATEGORY of the incriminating compu method to "IDENTICAL".

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

No branches or pull requests

2 participants