ha-bambulab icon indicating copy to clipboard operation
ha-bambulab copied to clipboard

[Bug] Refresh button brings up an error

Open Darthmonkey opened this issue 5 months ago • 4 comments

Describe the bug

When clicking the refresh button (..._force_refresh_data), it appears to work, but I get a bug: _"Failed to perform the action button/press. Caught blocking call to putrequest with args (<urllib3.connection.HTTPSConnection object at 0x7f56f42780>, 'GET', '/v1/iot-service/api/slicer/setting?version=undefined') inside the event loop by custom integration 'bambu_lab' at custom_components/bambu_lab/pybambu/bambu_cloud.py, line 189: response = requests.get(url, headers=headers, timeout=10). (offender: /usr/local/lib/python3.12/site-packages/urllib3/connection.py, line 219: return HTTPConnection.putrequest(self, method, url, *args, **kwargs)), please create a bug report at https://github.com/greghesp/ha-bambulab/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#putrequest"

To Reproduce

  1. Go to Settings | Devices | Bambu Lab | Devices | <P1x Printer>
  2. Press the 'Diagnostic - Force Refresh Data' button.
  3. Error message pops up bottom left of the screen showing the bug message.

Expected Behaviour

No bug message, refreshes all the data for the device.

What device are you using?

P1S

Diagnostic Output

No diagnostic data.

Log Extracts

No response

Other Information

Also happens for my P1P, and removing and re-adding a device doesn't seem to help.

Darthmonkey avatar Sep 08 '24 09:09 Darthmonkey