adamjakab / BeetsPluginAutofix

A beets plugin for obsessive-compulsive music geeks to run repetitive tasks all in one go.
MIT License
9 stars 2 forks source link

ValueError: invalid literal for int() with base 10 #11

Closed mattalxndr closed 4 months ago

mattalxndr commented 8 months ago

Got an error

Problem

Running your command in verbose (-vv) mode:

$ beet -vv autofix

Led to this problem:

user configuration: /config/config.yaml
data directory: /config
plugin paths:
Sending event: pluginload
library database: /config/musiclibrary.blb
library directory: /srv/data/music/beets
Sending event: library_opened
autofix: Task(missing_file_checker) is not enabled! Skipping.
autofix: Task(year_fixer) is not enabled! Skipping.
autofix: Task(audio_conversion) is not enabled! Skipping.
autofix: Task(tag_cleaner) is not enabled! Skipping.
autofix: Task(ab_data_fetcher) is not enabled! Skipping.
autofix: Task(xtractor) is not enabled! Skipping.
autofix: Task(genre_finder) is not enabled! Skipping.
autofix: The following tasks will be executed:
autofix: Selection query[[]]: AndQuery([TrueQuery()])
autofix: Ordering[[]]: <FixedFieldSort: albumartist+>
autofix: Total number of items: 1777
|⚠︎                                       | (!) 0/1777 [0%] in 0.1s (0.00/s)
Traceback (most recent call last):
File "/lsiopy/bin/beet", line 8, in <module>
sys.exit(main())
^^^^^^
File "/lsiopy/lib/python3.11/site-packages/beets/ui/__init__.py", line 1285, in main
_raw_main(args)
File "/lsiopy/lib/python3.11/site-packages/beets/ui/__init__.py", line 1272, in _raw_main
subcommand.func(lib, suboptions, subargs)
File "/lsiopy/lib/python3.11/site-packages/beetsplug/autofix/command.py", line 75, in func
self._execute_tasks_for_all_items()
File "/lsiopy/lib/python3.11/site-packages/beetsplug/autofix/command.py", line 85, in _execute_tasks_for_all_items
bar(str(item))
File "/lsiopy/lib/python3.11/site-packages/alive_progress/core/progress.py", line 428, in __call__
self._handle(*args, **kwargs)
File "/lsiopy/lib/python3.11/site-packages/alive_progress/core/progress.py", line 193, in bar
count = max(1, int(count))
^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'AFX - Analog Bubblebath, Vol 2 - Aboriginal Mix'

Setup

My configuration (output of beet config) is:

plugins:
  - autofix
directory: /srv/data/music/beets
library: /config/musiclibrary.blb

tasks:
  missing_file_checker:
    enabled: yes

My plugin version (output of beet autofix -v) is:

f5e837491f5b bash5.2 /srv/data/music $ beet autofix -v
autofix: Autofix(beets-autofix) plugin for Beets: v0.1.3
adamjakab commented 4 months ago

same as issue #7 and fixed in PR #9