Skip to content

Urlencode error using smartplaylist plugin #5905

@baconcreeper9001

Description

@baconcreeper9001

Tried switching on urlencode to make the plugins smartplaylists and beetstream work together. Currently my playlists don't work and every song can't be played.

Error when using splupdate:

smartplaylist: Updating 1 smart playlists...
smartplaylist: Creating playlist all.m3u
Traceback (most recent call last):
File "/usr/bin/beet", line 8, in
sys.exit(main())
~~~~^^
File "/home/cthulhu/.local/lib/python3.13/site-packages/beets/ui/init.py", line 1870, in main
_raw_main(args)
~~~~~~~~~^^^^^^
File "/home/cthulhu/.local/lib/python3.13/site-packages/beets/ui/init.py", line 1849, in _raw_main
subcommand.func(lib, suboptions, subargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cthulhu/.local/lib/python3.13/site-packages/beetsplug/smartplaylist.py", line 153, in update_cmd
self.update_playlists(lib, opts.pretend)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/cthulhu/.local/lib/python3.13/site-packages/beetsplug/smartplaylist.py", line 296, in update_playlists
item_uri = bytestring_path(pathname2url(item_uri))
~~~~~~~~~~~~^^^^^^^^^^
File "/usr/lib/python3.13/urllib/request.py", line 1679, in pathname2url
return quote(pathname, encoding=encoding, errors=errors)
File "/usr/lib/python3.13/urllib/parse.py", line 924, in quote
raise TypeError("quote() doesn't support 'encoding' for bytes")
TypeError: quote() doesn't support 'encoding' for bytes

My config:

directory: ~/Music/Library

--------------- Main ---------------

library: ~/musiclibrary.db

import:
move: yes
languages: en

ui:
color: yes
colors:
text_success: [bold, green]
text_warning: [bold, yellow]
text_error: [bold, red]
text_highlight: [bold, red]
text_highlight_minor: [white]
action_default: [bold, cyan]
action: [bold, cyan]
text: [normal]
text_faint: [faint]
import_path: [bold, blue]
import_path_items: [bold, blue]
added: [green]
removed: [red]
changed: [yellow]
added_highlight: [bold, green]
removed_highlight: [bold, red]
changed_highlight: [bold, yellow]
text_diff_added: [bold, red]
text_diff_removed: [bold, red]
text_diff_changed: [bold, red]
action_description: [white]

--------------- Plugins ---------------

plugins: spotify web smartplaylist webm3u
smartplaylist:
playlist_dir: /home/cthulhu/Music/Playlists
relative_to: /home/cthulhu/Music/Library
output: extm3u
urlencode: yes
forward_slash: no
playlists: [{name: all.m3u, query: ''}]
auto: yes
uri_format:
fields: []
prefix: REDACTED
pretend_paths: no
webm3u:
host: 127.0.0.1
port: 8339
cors: ''
cors_supports_credentials: no
reverse_proxy: no
include_paths: no
playlist_dir:
uri_format:
web:
host: 127.0.0.1
port: 8337
cors: ''
cors_supports_credentials: no
reverse_proxy: no
include_paths: no
readonly: yes
spotify:
source_weight: 0.5
mode: list
tiebreak: popularity
show_failures: no
artist_field: albumartist
album_field: album
track_field: title
region_filter:
regex: []
client_id: REDACTED
client_secret: REDACTED
tokenfile: spotify_token.json

Rather new to both linux and beets, and advice is appreciated. Using most recent version of endeavourOS and KDE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginPull requests that are plugins related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions