ebroecker / canmatrix

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

Formats error #90

Closed vfpape closed 6 years ago

vfpape commented 7 years ago

Dear all, Hello, Am not familiar with Python installation/execution but trying to use your tools. When I launch canconvert I have some error messagees, could you help me to find what is wrong in what I did ?

Thank you a lot,

test.dbc is an existing file and test.arxml is not existing.

C:\Users\vfpape\Desktop\canmatrix-0.5>pip install canmatrix Requirement already satisfied: canmatrix in d:\python install\lib\site-packages\ canmatrix-0.5-py3.6.egg

C:\Users\vfpape\Desktop\canmatrix-0.5>canconvert C:\Users\vfpape\Desktop\canmatr ix-0.5\AlexTest\test.dbc C:\Users\vfpape\Desktop\canmatrix-0.5\AlexTest\test.arx ml ERROR - formats - Error importing canmatrix.arxml ERROR - formats - Error importing canmatrix.kcd ERROR - formats - Error importing canmatrix.fibex ERROR - formats - Error importing canmatrix.xls ERROR - formats - Error importing canmatrix.xlsx ERROR - formats - Error importing canmatrix.yaml

Have a nice day, Regards, Alex

altendky commented 7 years ago

The short explanation is that the arxml format requires lxml as well. The other messages like that for formats you don't need can generally be ignored.

For installation I always use virtualenv to create an isolated environment for each project (or copy of a project). I personally do not activate them but just call the python from the virtualenv directly (venv\Scripts\python for example).

I would recommend you try the latest from the dev-0.6 branch. There has been a lot of development in there since 0.5 including specifically some arxml recently. pip can install directly from GitHub so the equivalent of what you did but for dev-0.6 (with a virtualenv in venv) would be venv/bin/pip install git+https://github.com/ebroecker/canmatrix@dev-0.6. But there's an extra piece you can specify to also get the option extras for arxml support, [arxml]. We have to get a little special to do both the git and extras and we end up with:

venv/bin/pip install git+https://github.com/ebroecker/canmatrix@dev-0.6#egg=canmatrix[arxml]
ebroecker commented 6 years ago

this can be closed?! If not - please reopen!

ibrarmohammed commented 5 years ago

Hello All,

I have a problem with Converting a Fibex file into an Yaml format using Canmatrix open source code.

Traceback (most recent call last): File "convert.py", line 304, in sys.exit(main()) File "convert.py", line 301, in main convert(infile, outfileName, **cmdlineOption File "convert.py", line 51, in convert for name in dbs: TypeError: 'NoneType' object is not iterable

I found that in Fibex,py file Load function is not defined is it not supported by Canmatrix ?

Please let me know thanks in advance.

Regards, Ibrar

ebroecker commented 1 year ago

https://github.com/ebroecker/canmatrix/pull/682