Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import error with reflink enabled and importadded plugin #4389

Closed
toyo-chi opened this issue Jun 28, 2022 · 0 comments · Fixed by #4390
Closed

Import error with reflink enabled and importadded plugin #4389

toyo-chi opened this issue Jun 28, 2022 · 0 comments · Fixed by #4390
Labels
bug bugs that are confirmed and actionable

Comments

@toyo-chi
Copy link
Contributor

Problem

First of all, many thanks for adding reflink option! Very promising feature. But in some cases it causes an error. E.g. with ImportAdded plugin enabled.

Running this command in verbose (-vv) mode:

$ beet -vv import [absolutely any music catalogue]

Led to this problem:

[probably non-related output is redacted]

Sending event: album_imported
Traceback (most recent call last):
  File "/usr/bin/beet", line 33, in <module>
    sys.exit(load_entry_point('beets==1.6.0', 'console_scripts', 'beet')())
  File "/usr/lib/python3.10/site-packages/beets/ui/__init__.py", line 1285, in main
    _raw_main(args)
  File "/usr/lib/python3.10/site-packages/beets/ui/__init__.py", line 1272, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/lib/python3.10/site-packages/beets/ui/commands.py", line 973, in import_func
    import_files(lib, paths, query)
  File "/usr/lib/python3.10/site-packages/beets/ui/commands.py", line 943, in import_files
    session.run()
  File "/usr/lib/python3.10/site-packages/beets/importer.py", line 340, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/lib/python3.10/site-packages/beets/util/pipeline.py", line 446, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/usr/lib/python3.10/site-packages/beets/util/pipeline.py", line 358, in run
    self.coro.send(msg)
  File "/usr/lib/python3.10/site-packages/beets/util/pipeline.py", line 170, in coro
    task = func(*(args + (task,)))
  File "/usr/lib/python3.10/site-packages/beets/importer.py", line 1573, in manipulate_files
    task.finalize(session)
  File "/usr/lib/python3.10/site-packages/beets/importer.py", line 612, in finalize
    self._emit_imported(session.lib)
  File "/usr/lib/python3.10/site-packages/beets/importer.py", line 638, in _emit_imported
    plugins.send('album_imported', lib=lib, album=self.album)
  File "/usr/lib/python3.10/site-packages/beets/plugins.py", line 488, in send
    result = handler(**arguments)
  File "/usr/lib/python3.10/site-packages/beets/plugins.py", line 145, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/beetsplug/importadded.py", line 105, in update_album_times
    album.added = min(album_mtimes)
ValueError: min() arg is an empty sequence

Setup

  • OS: ArchLinux
  • Python version: 3.10.5
  • beets version: 1.6.0
  • Turning off plugins made problem go away (yes/no): yes, importadded plugin

My configuration (output of beet config) is:

directory: /storage/music/show-reflink-bug
library: ~/.datasets/metadata/beets/show-reflink-bug.db.db

plugins: [importadded]

import:
    reflink: yes
    write: yes
importadded:
    preserve_mtimes: no
    preserve_write_mtimes: no
@sampsyo sampsyo added the bug bugs that are confirmed and actionable label Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants