[GH-ISSUE #77] Download failing, unicode encode error #54

Open
opened 2026-03-04 12:28:31 +03:00 by kerem · 2 comments
Owner

Originally created by @A-begger on GitHub (Jul 19, 2023).
Original GitHub issue: https://github.com/casualsnek/onthespot/issues/77

--- Logging error ---
Traceback (most recent call last):
File "logging/init.py", line 1113, in emit
UnicodeEncodeError: 'ascii' codec can't encode characters in position 120-128: ordinal not in range(128)
Call stack:
File "worker/downloader.py", line 347, in run
File "worker/downloader.py", line 52, in download_track
File "utils/spotify.py", line 353, in get_song_info
File "utils/spotify.py", line 101, in sanitize_data
File "logging/init.py", line 1489, in info
File "logging/init.py", line 1634, in _log
File "logging/init.py", line 1644, in handle
File "logging/init.py", line 1706, in callHandlers
File "logging/init.py", line 978, in handle
File "logging/init.py", line 1118, in emit
Message: 'Sanitising string: "\u30a8\u30f3\u30f4\u30a3\u30fc\u30d9\u30a4\u30d3\u30fc x KING"; Allow path separators: {allow_path_separators}'
Arguments: ()
[2023-07-19 13:29:33,895 :: spotutils :: utils/spotify.py -> 101: sanitize_data() :: INFO] -> Sanitising string: "KARENT"; Allow path separators: {allow_path_separators}
[2023-07-19 13:29:33,895 :: spotutils :: utils/spotify.py -> 101: sanitize_data() :: INFO] -> Sanitising string: "2021 Kanaria"; Allow path separators: {allow_path_separators}
[2023-07-19 13:29:33,895 :: spotutils :: utils/spotify.py -> 101: sanitize_data() :: INFO] -> Sanitising string: "2021 Kanaria / CFM inc."; Allow path separators: {allow_path_separators}
[2023-07-19 13:29:34,589 :: worker.downloader.SESSION_DL_TH-ebbbeb6a-f769-4ee1-9023-5965a9243783 :: worker/downloader.py -> 222: download_track() :: ERROR

Originally created by @A-begger on GitHub (Jul 19, 2023). Original GitHub issue: https://github.com/casualsnek/onthespot/issues/77 --- Logging error --- Traceback (most recent call last): File "logging/__init__.py", line 1113, in emit UnicodeEncodeError: 'ascii' codec can't encode characters in position 120-128: ordinal not in range(128) Call stack: File "worker/downloader.py", line 347, in run File "worker/downloader.py", line 52, in download_track File "utils/spotify.py", line 353, in get_song_info File "utils/spotify.py", line 101, in sanitize_data File "logging/__init__.py", line 1489, in info File "logging/__init__.py", line 1634, in _log File "logging/__init__.py", line 1644, in handle File "logging/__init__.py", line 1706, in callHandlers File "logging/__init__.py", line 978, in handle File "logging/__init__.py", line 1118, in emit Message: 'Sanitising string: "\u30a8\u30f3\u30f4\u30a3\u30fc\u30d9\u30a4\u30d3\u30fc x KING"; Allow path separators: {allow_path_separators}' Arguments: () [2023-07-19 13:29:33,895 :: spotutils :: utils/spotify.py -> 101: sanitize_data() :: INFO] -> Sanitising string: "KARENT"; Allow path separators: {allow_path_separators} [2023-07-19 13:29:33,895 :: spotutils :: utils/spotify.py -> 101: sanitize_data() :: INFO] -> Sanitising string: "2021 Kanaria"; Allow path separators: {allow_path_separators} [2023-07-19 13:29:33,895 :: spotutils :: utils/spotify.py -> 101: sanitize_data() :: INFO] -> Sanitising string: "2021 Kanaria / CFM inc."; Allow path separators: {allow_path_separators} [2023-07-19 13:29:34,589 :: worker.downloader.SESSION_DL_TH-ebbbeb6a-f769-4ee1-9023-5965a9243783 :: worker/downloader.py -> 222: download_track() :: ERROR
Author
Owner

@A-begger commented on GitHub (Jul 19, 2023):

It happens with japanese titles, not sure how to fix

<!-- gh-comment-id:1641445797 --> @A-begger commented on GitHub (Jul 19, 2023): It happens with japanese titles, not sure how to fix
Author
Owner

@tresni commented on GitHub (Jul 27, 2023):

Check your locale settings, make sure it's something like utf-8 as right now it looks like your terminal emulator is setting it to ascii.

<!-- gh-comment-id:1654515872 --> @tresni commented on GitHub (Jul 27, 2023): Check your locale settings, make sure it's something like utf-8 as right now it looks like your terminal emulator is setting it to ascii.
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/onthespot#54
No description provided.