YetAnotherNerd / whatlastgenre

Improve genre metadata of audio files based on tags from various music sites.
http://yetanothernerd.github.io/whatlastgenre
MIT License
79 stars 20 forks source link

support for python 3.x #14

Closed jones1008 closed 4 years ago

jones1008 commented 6 years ago

So my beets instance is currently running with Python 3.5.3 Since beets will drop support for Python 2.x sometime soon as you can read here will there be support for python 3.x for this nice piece of software?

Just for fun I tried to install your package with Python 3.x like this:

python3 setup.py install

and it didn't throw any error while installation and said at the end:

[...]
Finished processing dependencies for whatlastgenre==0.1.28

Then I set up wlg as a plugin in beets as explained here and tried running it manually from beets with beet wlg which brought me the error error: unknown command 'wlg'.

I guess this is due to wlgs limitation to Python 2.7 but on the other hand installing it with python 3.x didn't throw any error, so I was kinda confused...

jones1008 commented 6 years ago

actually I now know why the error error: unknown command 'wlg' came... I forgot to add wlg to my beets config to the plugins part, since I thought it would automatically be added through the pluginpath that I wrote into the config. Maybe it would be helpful to add this info to the README.md

Nevertheless I would want this ticket to be open as a feature request for Python 3.X support.

davdittrich commented 5 years ago

I did a quick'n'dirty port to Python3 with 2to3 and some additional debugging. It seems to work for me right now. I don't use redacted, though.

https://github.com/davdittrich/whatlastgenre

dogo77 commented 4 years ago

I did a quick'n'dirty port to Python3 with 2to3 and some additional debugging. https://github.com/davdittrich/whatlastgenre

I tried this fork, but i get following error:

Traceback (most recent call last): File "./whatlastgenre", line 24, in <module> main() File "/home/tba/Programme/wlg/whatlastgenre/wlg/whatlastgenre.py", line 877, in main wlg = WhatLastGenre(conf) File "/home/tba/Programme/wlg/whatlastgenre/wlg/whatlastgenre.py", line 61, in __init__ self.daprs = self.init_dataproviders() File "/home/tba/Programme/wlg/whatlastgenre/wlg/whatlastgenre.py", line 131, in init_dataproviders daprs.append(dataprovider.factory(dapr, self.conf)) File "/home/tba/Programme/wlg/whatlastgenre/wlg/dataprovider.py", line 68, in factory dapr = Redacted(conf) File "/home/tba/Programme/wlg/whatlastgenre/wlg/dataprovider.py", line 401, in __init__ self.session.cookies.set('session', cookie) File "/usr/lib/python3.8/site-packages/requests/cookies.py", line 215, in set self.set_cookie(c) File "/usr/lib/python3.8/site-packages/requests/cookies.py", line 344, in set_cookie if hasattr(cookie.value, 'startswith') and cookie.value.startswith('"') and cookie.value.endswith('"'): any chance for a working wlg version with python 3?

YetAnotherNerd commented 4 years ago

any chance for a working wlg version with python 3?

does the py3 branch work for you?

dogo77 commented 4 years ago

does the py3 branch work for you?

Works! Thank you!

…and sorry oranweing that late, i didn't get a notification :\