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

mpdstats: IndexError: tuple index out of range #1001

Closed
rafi opened this issue Oct 10, 2014 · 6 comments
Closed

mpdstats: IndexError: tuple index out of range #1001

rafi opened this issue Oct 10, 2014 · 6 comments

Comments

@rafi
Copy link

rafi commented Oct 10, 2014

After applying the proposed fix 606d47a for #972 I'm getting a different error:

Traceback (most recent call last):
  File "/usr/bin/beet", line 9, in <module>
    load_entry_point('beets==1.3.8', 'console_scripts', 'beet')()
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 964, in main
    _raw_main(args)
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 950, in _raw_main
    subcommands, plugins, lib = _setup(options, lib)
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 872, in _setup
    library.Item._types = plugins.types(library.Item)
  File "/usr/lib/python2.7/site-packages/beets/plugins.py", line 269, in types
    .format(plugin.name,))
IndexError: tuple index out of range
@sampsyo
Copy link
Member

sampsyo commented Oct 10, 2014

Oops; looks like there was a mistake in the error message for conflicting plugin fields. This won't solve everything, of course, but at least you'll get a useful error message now…

@rafi
Copy link
Author

rafi commented Oct 10, 2014

beets.plugins.PluginConflictException: Plugin mpdstats defines flexible field play_count which has already been defined.

Ah ha! That definitely made things clearer. mpdstats already defines the flexible fields data type. So it works as soon as I remove the type: settings I had in my config.

@sampsyo
Copy link
Member

sampsyo commented Oct 10, 2014

Great success! 🐟

@pscn
Copy link
Contributor

pscn commented Nov 4, 2014

I still get the PluginConflictException, if I have mpdstats and lastimport (awesome plugin by the way +1)) active. If the field is already defined wouldn't it be okay, to check if the type matches and ignore the conflict in that case?

What worked for me was in beets/plugins.py (line 265):

if field in types and plugin_types[field] != types[field]:

@sampsyo
Copy link
Member

sampsyo commented Nov 4, 2014

If the field is already defined wouldn't it be okay, to check if the type matches and ignore the conflict in that case?

Yep, that would be good to detect. Can you file another feature request?

@pscn
Copy link
Contributor

pscn commented Nov 4, 2014

#1059 ... After fighting with mobile github. Will add a description later.

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

3 participants