Skip to content
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

KeyError: 'Set_Axis_State' #735

Open
Tine11L opened this issue May 12, 2023 · 1 comment
Open

KeyError: 'Set_Axis_State' #735

Tine11L opened this issue May 12, 2023 · 1 comment
Labels

Comments

@Tine11L
Copy link

Tine11L commented May 12, 2023

When I run the python script named can_dbc_example, i get the following error:

Requesting AXIS_STATE_FULL_CALIBRATION_SEQUENCE (0x03) on axisID: 0 Traceback (most recent call last): File "/home/pi/Desktop/CAN_CODE_DECODE/can_dbc_example.py", line 14, in <module> msg = db.get_message_by_name('Set_Axis_State') File "/home/pi/.local/lib/python3.9/site-packages/cantools/database/can/database.py", line 384, in get_message_by_name return self._name_to_message[name] KeyError: 'Set_Axis_State'

Im running this python script on Raspberry Pi 4 in IDLE (using Python-3.9.2)

@Tine11L Tine11L added the bug label May 12, 2023
@samuelsadok
Copy link
Member

In case you're using this with a recent ODrive Pro/S1 DBC file, as a workaround it should work if you prefix the message name with Axis0_. So Axis0_Set_Axis_State. Same for the other message names too.

I'm not sure if this is actually desirable, I'll have to review whether we should fix the example or the DBC file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants