Skip to content

Null error reported and exception generated in log #133

@synman

Description

@synman

Describe the bug
when resetting the cnc machine if a grbl error occurs it does not always reflect the error description and an exception is logged in the octoprint log

To Reproduce
be in an alarm state (due to homing required)
unlock
restart fluid

Expected behavior
a clear message

Screenshots
n/a

Logs

2025-11-08 10:06:27,313 - octoprint.util.comm - ERROR - Error while processing hook bettergrblsupport:
Traceback (most recent call last):
  File "/opt/services/OctoPrint/lib/python3.11/site-packages/octoprint/util/comm.py", line 4218, in _readline
    ret = hook(self, ret)
          ^^^^^^^^^^^^^^^
  File "/opt/services/OctoPrint/lib/python3.11/site-packages/octoprint/util/__init__.py", line 1692, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/services/OctoPrint/lib/python3.11/site-packages/octoprint_bettergrblsupport/__init__.py", line 1116, in hook_gcode_received
    return _bgs.process_grbl_alarm(self, line)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/services/OctoPrint/lib/python3.11/site-packages/octoprint_bettergrblsupport/_bgs.py", line 705, in process_grbl_alarm
    return "ok " + desc
           ~~~~~~^~~~~~```
**Additional context**
na

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions