Running beet import on a directory containing a file with a special/unrecognized character causes the import to fail when the convert plugin is enabled.
The error does not occur if the file is renamed to something else (like "abc.flac") before importing.
Sending event: write
zero: images: -> None
Sending event: after_write
Sending event: database_change
convert: Encoding /root/temp/112 - Soleil de Nuit (mit Pierre Maubouch).flac
Traceback (most recent call last):
File "/usr/local/bin/beet", line 11, in <module>
load_entry_point('beets==1.4.9', 'console_scripts', 'beet')()
File "/usr/local/lib/python3.7/site-packages/beets/ui/__init__.py", line 1266, in main
_raw_main(args)
File "/usr/local/lib/python3.7/site-packages/beets/ui/__init__.py", line 1253, in _raw_main
subcommand.func(lib, suboptions, subargs)
File "/usr/local/lib/python3.7/site-packages/beets/ui/commands.py", line 955, in import_func
import_files(lib, paths, query)
File "/usr/local/lib/python3.7/site-packages/beets/ui/commands.py", line 925, in import_files
session.run()
File "/usr/local/lib/python3.7/site-packages/beets/importer.py", line 329, in run
pl.run_parallel(QUEUE_SIZE)
File "/usr/local/lib/python3.7/site-packages/beets/util/pipeline.py", line 445, in run_parallel
six.reraise(exc_info[0], exc_info[1], exc_info[2])
File "/usr/local/lib/python3.7/site-packages/six.py", line 703, in reraise
raise value
File "/usr/local/lib/python3.7/site-packages/beets/util/pipeline.py", line 312, in run
out = self.coro.send(msg)
File "/usr/local/lib/python3.7/site-packages/beets/util/pipeline.py", line 194, in coro
func(*(args + (task,)))
File "/usr/local/lib/python3.7/site-packages/beets/importer.py", line 1511, in plugin_stage
func(session, task)
File "/usr/local/lib/python3.7/site-packages/beets/plugins.py", line 143, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/beetsplug/convert.py", line 177, in auto_convert
self.convert_on_import(config.lib, item)
File "/usr/local/lib/python3.7/site-packages/beetsplug/convert.py", line 479, in convert_on_import
self.encode(command, item.path, dest)
File "/usr/local/lib/python3.7/site-packages/beetsplug/convert.py", line 223, in encode
encode_cmd.append(args[i].encode(util.arg_encoding()))
UnicodeEncodeError: 'utf-8' codec can't encode character '\udce9' in position 145: surrogates not allowed
An archive with the file in question inside is here
Setup
OS: FreeBSD 12.1-RELEASE
Python version: Python 3.7.7 (from FreeBSD ports)
beets version: beets version 1.4.9 (from FreeBSD ports)
Turning off plugins made problem go away (yes/no): Yes. Turning off the convert plugin made this problem go away. However, this uncovered a similar issue with the replaygain plugin.
Problem
Running
beet import
on a directory containing a file with a special/unrecognized character causes the import to fail when the convert plugin is enabled.The error does not occur if the file is renamed to something else (like "abc.flac") before importing.
An archive with the file in question inside is here
Setup
My configuration (output of
beet config
) is: