-
Notifications
You must be signed in to change notification settings - Fork 407
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
Errors while parsing DBC #330
Comments
Are you able to share the problematic .dbc? Regardless, please share what version of canmatrix you are running and also the full traceback. Cheers, |
Sorry I cannot share the dbc. This is the command I run: The traceback is composed by a set of errors like:
and
Hope this helps. Cheers |
@gianpyc I could identify one problem... I have a local fix for this issue here. Thanks |
with this command my repo is not updated and I get:
So, I updated manually the file dpc.py but I wasn't able to update test_dbc.py. This last file seems different with the version that you modified. Btw, when running the command again I got less errors but this traceback:
Thanks for your help |
Thanks for trying the fix. without digging in it seems a bit like there is no ? |
I have this definition: Trying this instead: Same error Thanks |
Thanks for looking into your dbc.
is surely right (the other one with I'm a bit clueless, the code which fails does nothing really complicated: canmatrix/src/canmatrix/copy.py Lines 46 to 49 in 5ccf848
walk through all attributes of the given ECU and copy these attributes and their definitons to the new matrix. And it looks like the definition is not found. But you found it in your dbc... I'll play a bit around, maybe I'll find some hint... EDIT: I can reproduce now. please stay tuned for a fix. |
could you please again fetch the |
Now I get this traceback:
Thanks |
Hi @gianpyc we did heavy refactoring the last days [ |
Thanks,
|
seems you have a lot of special characters in attribute names ... could you please try once more? |
No I get this traceback :(
From a quick debug I saw that temp.group(2) and temp.group(3) are empty. Only temp.group(1) has a content. Thanks for your support |
Hi @gianpyc, Did you upgrade branch "iss330" or did you only apply I activated the global "try" "except" again in 33f0259, this should print out the failing input line in dbc. EDIT: If you are debugging, just give me the content of |
Before I did Now, I replaced all the code that I have in dbc.py with last one you updated: And I get this traceback:
Thanks |
ok, thanks, I'm gonna work on this, looks quite similar to the initial bug... |
ok, it's worth another try |
Much better, now I reach the end of the operation if even this errors occurs during the parsing:
Plus other similar errors In addition, I'd like to ask if with canmatrix it is possible to extract signal frame in its hex format, as it'd be sent by an ECU in the CAN payload, by setting manually the signal value or by having all combination for those signal values. It'd be very nice to have as feature. Thanks a lot for your support |
@gianpyc Yes - it is possible to decode can-data and to encode can-data. have a look at Frame.decode canmatrix/src/canmatrix/canmatrix.py Line 1090 in eb6d4f4
and Frame.encode canmatrix/src/canmatrix/canmatrix.py Line 987 in eb6d4f4
|
Thanks for your patient too :)
Also thanks for the encode/decode functions. Is there a way to invoke using command line? Or in case is there a python example in which a I can load my dbc and encode signals of an ECU? |
ok, I think, I made it worse with one of the first commits and now have to repair it again... for encoding/decoding: What is your usecase, can you describe a bit, maybe I create a feature for you. |
Fantastic now it works without any errors! Thanks a lot 👍 For encoding my wish is to have a command line script in which I could set as parameter the name of the frame, e.g., testFrame1 in your example dbc, and the script prompts me to insert the value for each signal and at the end it provides me the encoded frame. Cheers |
yes the changes will be merged to mainline, this will take a few days, because I want to do some review and cleanup. I also going to create some example tool to create one frame |
I created an example tool in branch |
Thanks a lot for encodeFrame cli! It is what I needed. Can I ask you to do a similar thing for the decode, in which I pass the frame in hex format, the dbc and the frame is decoded. Really thanks |
Added |
Thanks a lot for all support you've done |
fixed |
I get an error when parsing a DBC similar to:
BA_ "Period [ms]" BO_ 1234567890 3000;
and
BA_ "Signal Age [ms]" SG_ 1234567890 sometext 5000;
Is this a bug or an issue on the DBC file?
Thanks
The text was updated successfully, but these errors were encountered: