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

Error editing id3 during import #1927

Closed
rlegrand opened this issue Apr 3, 2016 · 3 comments
Closed

Error editing id3 during import #1927

rlegrand opened this issue Apr 3, 2016 · 3 comments
Labels
bug bugs that are confirmed and actionable

Comments

@rlegrand
Copy link

rlegrand commented Apr 3, 2016

Problem

When I try to edit id3 tags on the fly (with the edit plugin, based on this functionality #396), I've got an error (stacktrace)

Running this command in verbose (-vv) mode:

$ beet -vv  import /media/multimedia/multimedia/zik/1955/

Led to this problem:

Tagging  -
No album IDs found.
Search terms:  -
Album might be VA: True
Evaluating 0 candidates.
Sending event: import_task_start

/media/multimedia/multimedia/zik/1955/file.mp3 (1 items)
Sending event: before_choose_candidate
No matching release found for 1 tracks.
For help, see: http://beets.readthedocs.org/en/latest/faq.html#nomatch
Looking up: /media/multimedia/multimedia/zik/1955/file2.mp3
[U]se as-is, as Tracks, Group albums, Skip, Enter search, enter Id, aBort,
Tagging 0 - 2
eDit? No album IDs found.
Search terms: 0 - 2
Album might be VA: False
D
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Sending event: albuminfo_received
Evaluating 5 candidates.
Candidate: *0 - 0.011
Success. Distance: 0.55
Candidate: 0 - Null & Void
Success. Distance: 0.57
Candidate: 0 - Null & Void
Success. Distance: 0.57
Candidate: 0 - Null & Void
Success. Distance: 0.57
Candidate: *0 - 0.000
Success. Distance: 0.83
Traceback (most recent call last):
  File "/usr/local/bin/beet", line 9, in <module>
    load_entry_point('beets==1.3.17', 'console_scripts', 'beet')()
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 1236, in main
    _raw_main(args)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 1226, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 966, in import_func
    import_files(lib, paths, query)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 943, in import_files
    session.run()
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 321, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/local/lib/python2.7/dist-packages/beets/util/pipeline.py", line 302, in run
    out = self.coro.send(msg)
  File "/usr/local/lib/python2.7/dist-packages/beets/util/pipeline.py", line 161, in coro
    task = func(*(args + (task,)))
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 1286, in user_query
    task.choose_match(session)
  File "/usr/local/lib/python2.7/dist-packages/beets/importer.py", line 780, in choose_match
    choice = session.choose_match(self)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 758, in choose_match
    post_choice = extra_ops[choice](self, task)
  File "/usr/local/lib/python2.7/dist-packages/beetsplug/edit.py", line 360, in importer_edit
    success = self.edit_objects(task.items, fields)
  File "/usr/local/lib/python2.7/dist-packages/beetsplug/edit.py", line 249, in edit_objects
    edit(new.name)
  File "/usr/local/lib/python2.7/dist-packages/beetsplug/edit.py", line 49, in edit
    subprocess.call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Setup

  • OS: debian (raspbian)
  • Python version: 2.7.9
  • beets version: 1.3.17
  • Turning off plugins made problem go away (yes/no): no (only using edit plugin)

My configuration (output of beet config) is:
directory: /media/multimedia/tmp

import:
    group_albums: yes
library: /media/multimedia/beets-library.blb

plugins: edit
edit:
    itemfields: track title artist album
    albumfields: album albumartist
    ignore_fields: id path
directory: /media/multimedia/tmp
library: /media/multimedia/beets-library.blb

import:
  group_albums: yes

plugins: edit

More:

I don't know python at all, but tried to add this to edit.py, line 49:

ui.print_(filename );

Which outputs:

/tmp/tmpili298.yaml

And this files effectively doesn't exists.

Thank you for your help.

@sampsyo sampsyo added needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." 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 Apr 3, 2016
@sampsyo
Copy link
Member

sampsyo commented Apr 3, 2016

I think the problem here is that beets tried to open your text editor, but the text editor command couldn't be found. (And it failed gracelessly.)

Can you check your $EDITOR variable to see which command beets was trying to invoke?

@rlegrand
Copy link
Author

rlegrand commented Apr 3, 2016

Yes you're right.
Setting the EDITOR environment variable solve the issue.

Thanks!

2016-04-03 23:36 GMT+02:00 Adrian Sampson notifications@github.com:

I think the problem here is that beets tried to open your text editor, but
the text editor command couldn't be found. (And it failed gracelessly.)

Can you check your $EDITOR variable to see which command beets was trying
to invoke?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1927 (comment)

@sampsyo sampsyo closed this as completed in fa2aa82 Apr 3, 2016
@sampsyo
Copy link
Member

sampsyo commented Apr 3, 2016

Great! I've just pushed a fix that should fail with a useful error when this happens.

sampsyo added a commit that referenced this issue Apr 3, 2016
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

No branches or pull requests

2 participants