simon-weber / gmusicapi

An unofficial client library for Google Music.
https://unofficial-google-music-api.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.48k stars 257 forks source link

cannot import name WC_Protocol #109

Closed fcaza closed 11 years ago

fcaza commented 11 years ago

since protocol.py moved to protocol/ I got the following error: --> cannot import name WC_Protocol

Looking at the code, I can't find WC_Protocol Class anymore (where it was in protocol.py before) (I'm using 'release-2013.03.04' tag) Did i miss something with the new protocol dir?

simon-weber commented 11 years ago

WC_Protocol doesn't exist anymore; everything in it has been moved to https://github.com/simon-weber/Unofficial-Google-Music-API/blob/develop/gmusicapi/protocol/webclient.py.

Does that answer your question?

fcaza commented 11 years ago

Hi, Yes it answers my question. Using the develop Branch, WC_Control had been removed, but now I encounter a new issue. I have the following error message: -> No module named six (I'm using python 2.7) I added six package v1.2.0 and this fix the import issue. Now i have a new one about: -> cannot import name ClientLogin Any idea?

simon-weber commented 11 years ago

If I had to guess, it sounds like you upgraded gmusicapi without pulling in the new dependencies.

If you want to use develop, I'd recommend doing pip install --upgrade git+git://github.com:simon-weber/Unofficial-Google-Music-API.git@develop rather than just, eg git pull.

If that doesn't fix things for you, be sure to post your entire error message - the last line by itself usually isn't too helpful.

fcaza commented 11 years ago

For "No module name six" yes this is fixed. But regarding "cannot import name ClientLogin", when i look at the code, i can see that session.py calls: "from gmusicapi.protocol.shared import ClientLogin" and when i look at shared.py, i can't see anything about ClientLogin I have nothing more than what i posted (I'm using an robot with a specific python IDE that hides more errors... unfortunately) Anyway, I'll try to dig deeper.

simon-weber commented 11 years ago

Yeah, I'm not sure what's wrong. All my tests pass, and ClientLogin is right here: https://github.com/simon-weber/Unofficial-Google-Music-API/blob/develop/gmusicapi/protocol/shared.py#L286.

fcaza commented 11 years ago

Well I didn't have the same files hosted on my Robot... I suspect a bad cleaning from my Robot. After a reboot, he got the right one (and i changed nothing since my update 1 hour ago) So the issue comes from my side (I mean, the robot :) ) Sorry for taking your time.... You can remove this issue

simon-weber commented 11 years ago

No problem; happy I could help!