[GH-ISSUE #462] [Bug]: uncaught exception in bambu_mqtt.py #287

Closed
opened 2026-05-06 12:27:56 +02:00 by BreizhHardware · 2 comments

Originally created by @cimdDev on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/462

Originally assigned to: @maziggy on GitHub.

Bug Description

I got this uncaught exception in bambu-mqtt.py:2701

Exception has occurred: AttributeError
'NoneType' object has no attribute 'set'
File "/home/user/bambuddy/backend/app/services/bambu_mqtt.py", line 2701, in _handle_kprofile_response
self._loop.call_soon_threadsafe(self._pending_kprofile_response.set)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/bambuddy/backend/app/services/bambu_mqtt.py", line 612, in _process_message
self._handle_kprofile_response(print_data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/home/user/bambuddy/backend/app/services/bambu_mqtt.py", line 461, in _on_message
self._process_message(payload)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'set'

Image

Expected Behavior

Receiving a kprofile response when no pending request exists should not raise an exception.
The handler should ignore the message or log a warning while continuing normal operation.

Steps to Reproduce

not sure how?

Printer Model

X1E

Bambuddy Version

0.2.1b

Printer Firmware Version

latest

Installation Method

Manual (git clone)

Operating System

Linux (Ubuntu/Debian)

Relevant Logs / Support Package


Screenshots

No response

Additional Context

Unfortunately, no support package logs were collected when this occurred.

Checklist

  • I have searched existing issues to ensure this bug hasn't already been reported
  • I am using the latest version of Bambuddy
  • My printer is set to LAN Only mode
Originally created by @cimdDev on GitHub (Feb 20, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/462 Originally assigned to: @maziggy on GitHub. ### Bug Description I got this uncaught exception in bambu-mqtt.py:2701 Exception has occurred: AttributeError 'NoneType' object has no attribute 'set' File "/home/user/bambuddy/backend/app/services/bambu_mqtt.py", line 2701, in _handle_kprofile_response self._loop.call_soon_threadsafe(self._pending_kprofile_response.set) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/user/bambuddy/backend/app/services/bambu_mqtt.py", line 612, in _process_message self._handle_kprofile_response(print_data) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "/home/user/bambuddy/backend/app/services/bambu_mqtt.py", line 461, in _on_message self._process_message(payload) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'set' <img width="1733" height="1102" alt="Image" src="https://github.com/user-attachments/assets/2977fee3-6ac3-4579-880c-0093fad960b7" /> ### Expected Behavior Receiving a kprofile response when no pending request exists should not raise an exception. The handler should ignore the message or log a warning while continuing normal operation. ### Steps to Reproduce not sure how? ### Printer Model X1E ### Bambuddy Version 0.2.1b ### Printer Firmware Version latest ### Installation Method Manual (git clone) ### Operating System Linux (Ubuntu/Debian) ### Relevant Logs / Support Package ```shell ``` ### Screenshots _No response_ ### Additional Context Unfortunately, no support package logs were collected when this occurred. ### Checklist - [x] I have searched existing issues to ensure this bug hasn't already been reported - [x] I am using the latest version of Bambuddy - [x] My printer is set to LAN Only mode
BreizhHardware 2026-05-06 12:27:56 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@cimdDev commented on GitHub (Feb 20, 2026):

Maybe it's just a none issue caused by my setup or by running in debug mode.

<!-- gh-comment-id:3933043316 --> @cimdDev commented on GitHub (Feb 20, 2026): Maybe it's just a none issue caused by my setup or by running in debug mode.
Author
Owner

@maziggy commented on GitHub (Feb 20, 2026):

Fixed in branch 0.2.1b2

<!-- gh-comment-id:3933829774 --> @maziggy commented on GitHub (Feb 20, 2026): Fixed in branch 0.2.1b2
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy#287
No description provided.