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
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#496
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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] CompletedExpected 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
@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!
@Christophe999s commented on GitHub (Mar 18, 2026):
Thank you!