1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[GH-ISSUE #742] [Bug]: Ntfy fails but test succeeds #496

Closed
opened 2026-05-07 00:10:58 +02:00 by BreizhHardware · 2 comments

Originally created by @Christophe999s on GitHub (Mar 18, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/742

Originally assigned to: @maziggy on GitHub.

Bug Description

Running v0.2.2 in a Debian 13 LXC (installed with quick install script).
When testing my selfhosted ntfy notifications, the test goes through, but when a print finishes, the notification fails.

Traceback (most recent call last): File "/opt/bambuddy/backend/app/services/notification_service.py", line 549, in _send_to_provider return await self._send_ntfy(config, title, message, image_data=image_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bambuddy/backend/app/services/notification_service.py", line 233, in _send_ntfy response = await client.put(url, content=image_data, headers=headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_client.py", line 1896, in put return await self.request( ^^^^^^^^^^^^^^^^^^^ ...<13 lines>... ) ^ File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_client.py", line 1527, in request request = self.build_request( method=method, ...<9 lines>... extensions=extensions, ) File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_client.py", line 367, in build_request headers = self._merge_headers(headers) File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_client.py", line 430, in _merge_headers merged_headers.update(headers) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_models.py", line 275, in update headers = Headers(headers) File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_models.py", line 156, in __init__ bytes_value = _normalize_header_value(v, encoding) File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_models.py", line 82, in _normalize_header_value return value.encode(encoding or "ascii") ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'ascii' codec can't encode characters in position 13-22: ordinal not in range(128) 2026-03-17 21:12:28,086 WARNING [backend.app.services.notification_service] Failed to send notification via Notify: 'ascii' codec can't encode characters in position 13-22: ordinal not in range(128) 2026-03-17 21:12:28,086 INFO [backend.app.main] [NOTIFY-BG] Completed

Expected Behavior

Send notification

Steps to Reproduce

Setup ntfy notification, run test
Add automated notification for print completed

Printer Model

P1S

Bambuddy Version

0.2.2

Printer Firmware Version

01.09.01.00

Installation Method

Other

Operating System

Linux (Ubuntu/Debian)

Relevant Logs / Support Package

No response

Screenshots

No response

Additional Context

No response

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
  • My printer has Developer Mode enabled
Originally created by @Christophe999s on GitHub (Mar 18, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/742 Originally assigned to: @maziggy on GitHub. ### Bug Description Running v0.2.2 in a Debian 13 LXC (installed with quick install script). When testing my selfhosted ntfy notifications, the test goes through, but when a print finishes, the notification fails. `Traceback (most recent call last): File "/opt/bambuddy/backend/app/services/notification_service.py", line 549, in _send_to_provider return await self._send_ntfy(config, title, message, image_data=image_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bambuddy/backend/app/services/notification_service.py", line 233, in _send_ntfy response = await client.put(url, content=image_data, headers=headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_client.py", line 1896, in put return await self.request( ^^^^^^^^^^^^^^^^^^^ ...<13 lines>... ) ^ File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_client.py", line 1527, in request request = self.build_request( method=method, ...<9 lines>... extensions=extensions, ) File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_client.py", line 367, in build_request headers = self._merge_headers(headers) File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_client.py", line 430, in _merge_headers merged_headers.update(headers) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_models.py", line 275, in update headers = Headers(headers) File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_models.py", line 156, in __init__ bytes_value = _normalize_header_value(v, encoding) File "/opt/bambuddy/venv/lib/python3.13/site-packages/httpx/_models.py", line 82, in _normalize_header_value return value.encode(encoding or "ascii") ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'ascii' codec can't encode characters in position 13-22: ordinal not in range(128) 2026-03-17 21:12:28,086 WARNING [backend.app.services.notification_service] Failed to send notification via Notify: 'ascii' codec can't encode characters in position 13-22: ordinal not in range(128) 2026-03-17 21:12:28,086 INFO [backend.app.main] [NOTIFY-BG] Completed` ### Expected Behavior Send notification ### Steps to Reproduce Setup ntfy notification, run test Add automated notification for print completed ### Printer Model P1S ### Bambuddy Version 0.2.2 ### Printer Firmware Version 01.09.01.00 ### Installation Method Other ### Operating System Linux (Ubuntu/Debian) ### Relevant Logs / Support Package _No response_ ### Screenshots _No response_ ### Additional Context _No response_ ### 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 - [x] My printer has Developer Mode enabled
BreizhHardware 2026-05-07 00:10:58 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@maziggy commented on GitHub (Mar 18, 2026):

Fixed in branch dev and available with the next release or daily build.


If you find Bambuddy useful, please consider giving it a on GitHub — it helps others discover the project!

<!-- gh-comment-id:4080714593 --> @maziggy commented on GitHub (Mar 18, 2026): Fixed in branch dev and available with the next release or daily build. ----- If you find Bambuddy useful, please consider giving it a ⭐ on [GitHub](https://github.com/maziggy/bambuddy) — it helps others discover the project!
Author
Owner

@Christophe999s commented on GitHub (Mar 18, 2026):

Thank you!

<!-- gh-comment-id:4084148915 --> @Christophe999s commented on GitHub (Mar 18, 2026): Thank you!
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-maziggy-1#496
No description provided.