You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to import a specific folder I get a UnicodeEncodeError. It is most likely related to the pathname/filename.
Running this command in verbose (-vv) mode:
--- Logging error ---
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\logging\__init__.py", line 1113, in emit
stream.write(msg + self.terminator)
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode characters in position 14-58: character maps to <undefined>
Call stack:
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\site-packages\beets\util\pipeline.py", line 311, in run
out = self.coro.send(msg)
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\site-packages\beets\util\pipeline.py", line 170, in coro
task = func(*(args + (task,)))
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\site-packages\beets\importer.py", line 1400, in user_query
task.choose_match(session)
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\site-packages\beets\importer.py", line 861, in choose_match
session.log_choice(self)
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\site-packages\beets\importer.py", line 281, in log_choice
self.tag_log('skip', paths)
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\site-packages\beets\importer.py", line 260, in tag_log
self.logger.info('{0} {1}', status, displayable_path(paths))
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\logging\__init__.py", line 1489, in info
self._log(INFO, msg, args, **kwargs)
File "C:\Users\arian\AppData\Local\Programs\Python\Python311\Lib\site-packages\beets\logging.py", line 88, in _log
return super()._log(level, m, (), exc_info, extra)
Message: <beets.logging.StrFormatLogger._LogMessage object at 0x00000236564C5F90>
Arguments: ()
Sending event: import_task_choice
Sending event: import
Sending event: cli_exit
As ever, Python 3's automatic handling of encodings can be really annoying, especially on Windows!
It looks like this error is coming from the import log (which goes to a file), not our normal logging stream (which goes to stderr). So I believe the fix on our end might be to force this stream to be UTF-8 here:
sampsyo
changed the title
Unicode Problem
Import log should probably force a UTF-8 encoding
Mar 8, 2023
sampsyo
added
bug
bugs that are confirmed and actionable
and removed
needinfo
We need more details or follow-up from the filer before this can be tagged "bug" or "feature."
labels
Mar 8, 2023
Problem
When trying to import a specific folder I get a UnicodeEncodeError. It is most likely related to the pathname/filename.
Running this command in verbose (
-vv
) mode:Led to this problem:
Here's a link to the music files that trigger the bug (if relevant):
https://nxtc.arianw.de/s/m2sQx35S37nG8e9
Setup
My configuration (output of
beet config
) is:The text was updated successfully, but these errors were encountered: