mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[PR #856] [MERGED] fix: UnicodeError for non-ascii headers #772
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#772
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?
📋 Pull Request Information
Original PR: https://github.com/sigma67/ytmusicapi/pull/856
Author: @mokurin000
Created: 1/24/2026
Status: ✅ Merged
Merged: 1/31/2026
Merged by: @sigma67
Base:
main← Head:fix/unicode-error📝 Commits (3)
b520103fix: UnicodeError for non-ascii headers3123cb2test: remove uselessencodingfor temporary file creation9b982b5test: fixlistenAgainFeedbackTokensKeyError📊 Changes
4 files changed (+30 additions, -10 deletions)
View changed files
📝
tests/auth/test_oauth.py(+4 -5)📝
tests/mixins/test_library.py(+5 -1)📝
ytmusicapi/auth/auth_parse.py(+20 -3)📝
ytmusicapi/auth/oauth/token.py(+1 -1)📄 Description
solve #855
Changes
All file open are forced to use 'utf-8' encoding, regardless on what platform, on python it was likely utf-8 on Linux and MacOS, and ANSI for Windows.
Also, this ensures headers to be encoded in URLEncode, thus, unicode characters are encoded as
%E7%E6%F7, e.g.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.