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

Plugin crashed without arguments #7

Open
catap opened this issue Sep 13, 2021 · 4 comments
Open

Plugin crashed without arguments #7

catap opened this issue Sep 13, 2021 · 4 comments

Comments

@catap
Copy link

catap commented Sep 13, 2021

√ Music % beet summarize         
Traceback (most recent call last):
  File "/opt/local/bin/beet", line 33, in <module>
    sys.exit(load_entry_point('beets==1.5.0', 'console_scripts', 'beet')())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/beets/ui/__init__.py", line 1291, in main
    _raw_main(args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/beets/ui/__init__.py", line 1278, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/beetsplug/summarize.py", line 230, in summarize
    show_summary(lib, decargs(args), opts.group_by, opts.stats, not opts.not_reverse)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/beetsplug/summarize.py", line 212, in show_summary
    sort_stat = stats.keys()[0]
TypeError: 'odict_keys' object is not subscriptable
? Music % beet
@catap
Copy link
Author

catap commented Sep 13, 2021

And it seems broken :(

√ Music % beet help summarize -g year -R 
Usage: beet help [options]

beet help: error: no such option: -g
? Music % beet help summarize --group-by year -R
Usage: beet help [options]

beet help: error: no such option: --group-by
? Music % 

@steven-murray
Copy link
Owner

Dang. I'll have to re-read the plugin dev documentation. I'll try to do this soon.

@steven-murray
Copy link
Owner

I think I fixed the first issue (about ordered dicts). The second issue seems more to do with how CLI arguments are detected by beets, and may be a version issue. It'll take me a little more time to fix that

@steven-murray
Copy link
Owner

Looking at this again, I think doing beet help summarize should work, but beet help summarize -g year won't work because help doesn't know about the -g option.

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