Skip to content

KeyError: 'max_accel_to_decel' #27

@LetMyPplGo

Description

@LetMyPplGo

When running main.py this error appears:

Traceback (most recent call last):
  File "/home/admin/KlipperLCD/main.py", line 224, in <module>
    x = KlipperLCD()
        ^^^^^^^^^^^^
  File "/home/admin/KlipperLCD/main.py", line 26, in __init__
    self.printer.init_Webservices()
  File "/home/admin/KlipperLCD/printer.py", line 439, in init_Webservices
    self.max_accel_to_decel     = toolhead['max_accel_to_decel']
                                  ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'max_accel_to_decel'

The issue is that latest klipper does not provide this parameter.

The fix is to fallback to max_accel in printer.py, line 439, like this:

self.max_accel_to_decel     = toolhead.get('max_accel_to_decel', self.max_accel)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions