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

KeyError: u'WEB-flac' #1481

Closed
kelvinhammond opened this issue May 29, 2015 · 1 comment
Closed

KeyError: u'WEB-flac' #1481

kelvinhammond opened this issue May 29, 2015 · 1 comment

Comments

@kelvinhammond
Copy link

Key Error when importing a flac file.

Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 859, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 732, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 471, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 331, in getMessage
    msg = str(self.msg)
  File "/home/kelvin/beets/beets/logging.py", line 85, in __str__
    return self.msg.format(*args, **kwargs)
KeyError: u'WEB-flac'
Logged from file importer.py, line 1324
@sampsyo
Copy link
Member

sampsyo commented May 29, 2015

Can you provide a little bit more context? What's the filename you were importing, for example? Did it happen to have curly braces {} in the name?

My suspicion is that it did, in which case this should be fixed in the above commit.

LordSputnik pushed a commit to LordSputnik/beets that referenced this issue Jul 6, 2015
Otherwise, we risk the user-provided string looking like a format string! If
it contains curly braces, it can behave unexpectedly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants