test-fullautomation / robotframework-doip

doip support for robotframework
Apache License 2.0
0 stars 1 forks source link

odxtools v 6.7.1 cause crash #21

Open test-fullautomation opened 4 months ago

test-fullautomation commented 4 months ago

Project uses odxtools to de-/encode of UDS-Messages. The following issue occures with odxtools v 6.7.1 and RFAIO 0.11.4:

    return Database(pdx_zip=ZipFile(pdx_file))
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\database.py", line 70, in __init__
    dlcs.append(DiagLayerContainer.from_et(dlc, []))
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\diaglayercontainer.py", line 64, in from_et
    base_variants = NamedItemList([
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\diaglayercontainer.py", line 65, in <listcomp>
    DiagLayer.from_et(dl_element, doc_frags)
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\diaglayer.py", line 61, in from_et
    diag_layer_raw = DiagLayerRaw.from_et(et_element, doc_frags)
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\diaglayerraw.py", line 104, in from_et
    diag_data_dictionary_spec = DiagDataDictionarySpec.from_et(ddds_elem, doc_frags)
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\diagdatadictionaryspec.py", line 82, in from_et
    data_object_props = [
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\diagdatadictionaryspec.py", line 83, in <listcomp>
    DataObjectProperty.from_et(dop_element, doc_frags)
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\dataobjectproperty.py", line 59, in from_et
    compu_method = create_any_compu_method_from_et(
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\compumethods\createanycompumethod.py", line 136, in create_any_compu_method_from_et
    CompuScale.compuscale_from_et(
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\compumethods\compuscale.py", line 63, in compuscale_from_et
    compu_const = physical_type.create_from_et(et_element.find("COMPU-CONST"))
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\odxtypes.py", line 203, in create_from_et
    return self.from_string(odxrequire(vt_elem.text))
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\exceptions.py", line 76, in odxrequire
    odxraise(message)
  File "C:\RobotFramework\python39\lib\site-packages\odxtools\exceptions.py", line 39, in odxraise
    raise error_type()
odxtools.exceptions.OdxError

downgrade to odxtools v 5.1.0 solves the issue.

Expected: odxtools v 6.7.1 work properly.

test-fullautomation commented 1 month ago

Hi @huavanthong , @trimai3001 , what is the status of this issue. is this still relevant? Thank you, Thomas

huavanthong commented 1 month ago

Hi Thomas,

This issue related to the configuration of ODX Tools at: https://github.com/mercedes-benz/odxtools And it can be run successfully when enable strict_mode = False as below:

import odxtools

odxtools.exceptions.strict_mode = False
db = odxtools.load_file("CTS_STLA_V1_15_2.pdx")

ecu = db.ecus.CTS_STLA_Brain
print(f"Available services for {ecu.short_name}: {ecu.services}")

Therefore, I think it's not relevant to DoIP package.

Please take it for your info.

Thank you and best regards, Thong Hua