I get an error when using the hooks plugin, Haven’t seen this work yet so i’m not sure if i’m not using it correct or missing a dependancy or something, but here is the output i get when i enable the plugin
F:\Download Queues\Complete\Music - Lidarr\Iron.Maiden.-.Maiden.Japan.(2021.Remaster).(2021).[24Bit-96kHz].FLAC.[PMEDIA]._ϸ_ (5 items)
Skipping.
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\logging\__init__.py", line 1101, in emit
stream.write(msg + self.terminator)
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u03f8' in position 128: character maps to <undefined>
Call stack:
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\threading.py", line 966, in _bootstrap
self._bootstrap_inner()
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
self.run()
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\site-packages\beets\util\pipeline.py", line 311, in run
out = self.coro.send(msg)
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\site-packages\beets\util\pipeline.py", line 170, in coro
task = func(*(args + (task,)))
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\site-packages\beets\importer.py", line 1400, in user_query
task.choose_match(session)
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\site-packages\beets\importer.py", line 861, in choose_match
session.log_choice(self)
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\site-packages\beets\importer.py", line 281, in log_choice
self.tag_log('skip', paths)
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\site-packages\beets\importer.py", line 260, in tag_log
self.logger.info('{0} {1}', status, displayable_path(paths))
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\lib\logging\__init__.py", line 1468, in info
self._log(INFO, msg, args, **kwargs)
File "C:\Users\Andrew Sutcliffe\AppData\Local\Programs\Python\Python310\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 0x00000214B52008E0>
Arguments: ()
Here is the syntax of the hook’s i’m using
hook:
hooks:
# Output on exit:
# beets just exited!
# have a nice day!
- event: cli_exit
command: echo "beets just exited!"
- event: cli_exit
command: echo "have a nice day!"
# Output on item import:
# importing "<file_name_here>"
# Where <file_name_here> is the item being imported
- event: item_imported
command: echo "importing "{album.path}"
# Output on write:
# writing to "<file_name_here>"
# Where <file_name_here> is the file being written to
#- event: write
# command: echo "writing to {path}"