[GH-ISSUE #260] Error whilst creating a new YT-Music Playlist #202

Closed
opened 2026-02-27 22:08:35 +03:00 by kerem · 1 comment
Owner

Originally created by @JakobMei on GitHub (Feb 14, 2022).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/260

Hello there,
I really like this library and started developing a playlist-converter from different music services to YT-Music.
But when I want to create a new Playlist on YT-Music (whilst calling the function ytmusic.create_playlist(...)) I get an error like this one:
File "/Users/xxx/PycharmProjects/x/venv/lib/python3.9/site-packages/ytmusicapi/mixins/playlists.py", line 158, in create_playlist 'description': html_to_txt(description), # YT does not allow HTML tags File "/Users/xxx/PycharmProjects/x/venv/lib/python3.9/site-packages/ytmusicapi/helpers.py", line 73, in html_to_txt tags = re.findall("<[^>]+>", html_text) File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/re.py", line 241, in findall return _compile(pattern, flags).findall(string) TypeError: expected string or bytes-like object
Is this a known issue or am I the only one getting this? Error message isn't helping that well 😄

(btw wasnt calling the function with any html-tags, just a title, and privacy status "PUBLIC".)

Cheers and looking foward to an answer,
Jakob

Originally created by @JakobMei on GitHub (Feb 14, 2022). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/260 Hello there, I really like this library and started developing a playlist-converter from different music services to YT-Music. But when I want to create a new Playlist on YT-Music (whilst calling the function ytmusic.create_playlist(...)) I get an error like this one: ` File "/Users/xxx/PycharmProjects/x/venv/lib/python3.9/site-packages/ytmusicapi/mixins/playlists.py", line 158, in create_playlist 'description': html_to_txt(description), # YT does not allow HTML tags File "/Users/xxx/PycharmProjects/x/venv/lib/python3.9/site-packages/ytmusicapi/helpers.py", line 73, in html_to_txt tags = re.findall("<[^>]+>", html_text) File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/re.py", line 241, in findall return _compile(pattern, flags).findall(string) TypeError: expected string or bytes-like object ` Is this a known issue or am I the only one getting this? Error message isn't helping that well 😄 (btw wasnt calling the function with any html-tags, just a title, and privacy status "PUBLIC".) Cheers and looking foward to an answer, Jakob
kerem closed this issue 2026-02-27 22:08:35 +03:00
Author
Owner

@JakobMei commented on GitHub (Feb 14, 2022):

Okay found the mistake:
apparently you need to set an empty string as playlist description instead of a None-Value.

I'll close this issue.

<!-- gh-comment-id:1038937612 --> @JakobMei commented on GitHub (Feb 14, 2022): Okay found the mistake: apparently you need to set an empty string as playlist description instead of a None-Value. I'll close this issue.
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/ytmusicapi#202
No description provided.