ebroecker / canmatrix

Converting Can (Controller Area Network) Database Formats .arxml .dbc .dbf .kcd ...
BSD 2-Clause "Simplified" License
933 stars 401 forks source link

Arxml convert to DBC #806

Closed spark-0529 closed 4 months ago

spark-0529 commented 4 months ago

hello here I want to vonvert the Arxml to DBC file ,but I find this issue ,please have a check ,thank you DEBUG - arxml - processing Frame-Trigger: FrTrEpbChassisCANFD2Fr01 DEBUG - arxml - Frame: EpbChassisCANFD2Fr01 DEBUG - arxml - PDU: EpbChassisCANFD2SignalIpdu01 DEBUG - arxml - get_signals: found I-SIGNAL-GROUP DEBUG - arxml - get_signals: found I-SIGNAL-GROUP Traceback (most recent call last): File "C:\python\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\python\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\python\lib\site-packages\canmatrix\cli\convert.py", line 160, in sys.exit(cli_convert()) File "C:\python\lib\site-packages\click\core.py", line 1157, in call return self.main(args, kwargs) File "C:\python\lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "C:\python\lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "C:\python\lib\site-packages\click\core.py", line 783, in invoke return __callback(args, kwargs) File "C:\python\lib\site-packages\canmatrix\cli\convert.py", line 155, in cli_convert canmatrix.convert.convert(infile, outfile, options) File "C:\python\lib\site-packages\canmatrix\convert.py", line 68, in convert dbs = canmatrix.formats.loadp(infile, options) File "C:\python\lib\site-packages\canmatrix\formats__init__.py", line 71, in loadp return load(fileObject, import_type, key, options) File "C:\python\lib\site-packages\canmatrix\formats__init__.py", line 88, in load dbs = module_instance.load(file_object, **options) # type: ignore File "C:\python\lib\site-packages\canmatrix\formats\arxml.py", line 2070, in load source_signal = ea.selector(source_triggering[0], "/I-SIGNAL-REF") File "C:\python\lib\site-packages\canmatrix\formats\arxml.py", line 306, in selector return sorted(result_list, key=lambda element: element.sourceline) File "C:\python\lib\site-packages\canmatrix\formats\arxml.py", line 306, in return sorted(result_list, key=lambda element: element.sourceline) AttributeError: 'NoneType' object has no attribute 'sourceline'

spark-0529 commented 4 months ago

image

spark-0529 commented 4 months ago

image

spark-0529 commented 4 months ago

image

spark-0529 commented 4 months ago

now it worked and successful convert ,thank you

spark-0529 commented 4 months ago

convert successful

xuechengz0801 commented 4 months ago

image

hi,spark-0529 I have a same issue as yours,how to convert the .arxml even though I used 'python -m canmatrix.cli.convert...'?