ebroecker / canmatrix

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

canconvert .dbc to .kcd fails #665

Closed AKstudios closed 1 year ago

AKstudios commented 2 years ago

Trying to convert a dbc file that has scaling, min and max values in the signals. I was able to do this in an older version of canmatrix (>2 years ago), but using the latest commit as of Oct. 20, 2022 gives the following error:

canconvert source.dbc dest.kcd

arxml is not supported ldf is not supported kcd is not supported fibex is not supported odx is not supported INFO - convert - Importing source.dbc ... INFO - convert - done

INFO - convert - Exporting dest.kcd ... INFO - convert - INFO - convert - 14 Frames found > ERROR - init - This file format is not supported for writing INFO - convert - done

ebroecker commented 2 years ago

I think you need to install lxml library

AKstudios commented 2 years ago

I already have it installed. When I try to run pip install lxml, it gives the following message:

Requirement already satisfied: lxml in ./.local/lib/python3.9/site-packages (4.9.1)

ebroecker commented 2 years ago

Hi @AKstudios

ok, hmm... maybe not the same python version is used if you call "canconvert".

what happens if you try python -m canmatrix.convert instead of canconvert ?

AKstudios commented 1 year ago

@ebroecker when I run python -m canmatrix.convert, I get this:

arxml is not supported ldf is not supported kcd is not supported fibex is not supported odx is not supported

It does not write anything to file, but it isn't throwing an error either.

If it helps, the Python version I have is 3.9.2.

ebroecker commented 1 year ago

I still think, that your python installation does not find the lxml library.

maybe you once more try to install lxml.

AKstudios commented 1 year ago

Actually, this is completely my fault, I forgot to mention the main thing: I'm running canmatrix on a Raspberry Pi. So what finally worked is installing lxml like so: sudo apt-get install python3-lxml.

Thanks for helping out! Please feel free to close the issue.