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 running #6

Open
gatlinnewhouse opened this issue Feb 19, 2017 · 5 comments
Open

Error running #6

gatlinnewhouse opened this issue Feb 19, 2017 · 5 comments

Comments

@gatlinnewhouse
Copy link

  File "/usr/bin/beet", line 11, in <module>
    load_entry_point('beets==1.4.4', 'console_scripts', 'beet')()
  File "/usr/lib/python3.6/site-packages/beets/ui/__init__.py", line 1209, in main
    _raw_main(args)
  File "/usr/lib/python3.6/site-packages/beets/ui/__init__.py", line 1196, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/delueze/.config/beets/plugins/rymgenre/__init__.py", line 187, in rymgenre_func
    genres = self._get_genre(album)
  File "/home/delueze/.config/beets/plugins/rymgenre/__init__.py", line 176, in _get_genre
    self.config['separator'].get(unicode).join(genres)))
NameError: name 'unicode' is not defined
@gatlinnewhouse
Copy link
Author

Perhaps it'll work by changing

python .get(unicode)

to

python .encode(unicode)

@gatlinnewhouse
Copy link
Author

Running 2to3 -w __init__.py will fix the issue. I will submit a pull request.

@gatlinnewhouse
Copy link
Author

Although eventually this error will occur:

Traceback (most recent call last):
  File "/usr/bin/beet", line 11, in <module>
    load_entry_point('beets==1.4.4', 'console_scripts', 'beet')()
  File "/usr/lib/python3.6/site-packages/beets/ui/__init__.py", line 1209, in main
    _raw_main(args)
  File "/usr/lib/python3.6/site-packages/beets/ui/__init__.py", line 1196, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/delueze/.config/beets/plugins/rymgenre/__init__.py", line 187, in rymgenre_func
    genres = self._get_genre(album)
  File "/home/delueze/.config/beets/plugins/rymgenre/__init__.py", line 169, in _get_genre
    release = self._get_best_release(self._get_albums(album), album)
  File "/home/delueze/.config/beets/plugins/rymgenre/__init__.py", line 144, in _get_best_release
    print(('URL:\n    %s' % albums[0]['href']))
IndexError: list index out of range

@gatlinnewhouse
Copy link
Author

Maybe eventually this can be fixed (because of the upcoming API) since the error seems to be deriving from rateyourmusic giving back a 503 server error for requests when I run requests in the python3 shell(?).

gatlinnewhouse referenced this issue in gatlinnewhouse/beets-rymgenre Feb 22, 2017
@jcazevedo
Copy link
Owner

jcazevedo commented Feb 24, 2017

Thanks for the interest in beets-rymgenre!

I'm not actively maintaining the project and I don't recommend people using it for the time being. I might consider getting back to the project when/if they publish an API.

I got banned from rateyourmusic.com for a couple of months in mid-2016 for what was claimed to be an abusive use of the site through this plugin. The answer I got from Hossein Sharifi pointed out to scraping being disallowed:

RYM does not allow (and has never allowed) access via scraping or other types of scripts which access the site in an automated fashion. Please refrain from doing so until we complete our API, which is currently being developed and should be part of Sonemic.

I should've updated the README with a warning for this (and I shall do it now done in b8efd3b).

That being said, I'll try to review your PR during the weekend. I'm not a regular Python developer so I need some time to be aware of differences between Python 2.* and Python 3.* and of the implications of your change.

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