pygooglevoice icon indicating copy to clipboard operation
pygooglevoice copied to clipboard

Issue with login

Open LukeCLindgren opened this issue 8 years ago • 8 comments

Pulling from the newest version of the repository (#41), I'm the code is raising a login error.

This is what I have written: `from googlevoice import Voice from googlevoice.util import input import BeautifulSoup

username, password = "[email protected]", "xxxxxx" ......

def google_login(username, password): voice = Voice() client = voice.login(username, password) print client return client `

However, I'm getting this error: Traceback (most recent call last): File "E:/Jason Core/Boot.py", line 75, in <module> control() File "E:/Jason Core/Boot.py", line 70, in control logins = System_Logins.read_logins(basedir) File "E:\Jason Core\System_Logins.py", line 33, in read_logins gv = google_login(login_list[type_list.index(item)], password_list[type_list.index(item)]) File "E:\Jason Core\System_Logins.py", line 44, in google_login client = voice.login(username, password) File "C:\Python27\lib\site-packages\googlevoice\voice.py", line 94, in login raise LoginError

LukeCLindgren avatar Sep 12 '17 17:09 LukeCLindgren

pygooglevoice can be spotty about identifying particular login failures. However, since it's still working for me I suspect that the particular problem is related to your Google account.

I'd suggest a couple of things. First, go into your Google settings and choose the less-secure option for allowing apps to login. Second, do your early testing with the "gvoice" application that comes with pygooglevoice; that will eliminate the possibility that it's bugs in your own application. Once you can use gvoice to login and do something simple, you'll know you have the Google settings right and can return to your own app.

gkuenning avatar Sep 14 '17 21:09 gkuenning

I have a similar login problem:

[andrea@darius ~]$ gvoice Email address:[email protected] Password: Traceback (most recent call last): File "/usr/bin/gvoice", line 79, in login() File "/usr/bin/gvoice", line 49, in login voice.login(options.email,options.passwd) File "build/bdist.linux-x86_64/egg/googlevoice/voice.py", line 72, in login AttributeError: 'NoneType' object has no attribute 'group'

I've disabled two-factor authorization from my google account. I've enabled access for less secure apps. I've connected to GV on my server with a commandline browser and logged in successfully:

[andrea@darius ~]$ lynx https://voice.google.com

I'm not sure why gvoice is not logging me in.

andreawhitlock avatar Sep 18 '17 21:09 andreawhitlock

@LukeCLindgren @andreawhitlock Try visiting this URL to "unlock" your account for login from a "new device" (any device/machine which GV possibly hasn't gotten a login request from, ever, or not recently). https://accounts.google.com/DisplayUnlockCaptcha Post back and let us know if this fixes the login for you.

chris001 avatar Sep 19 '17 01:09 chris001

@chris001 this worked for me. Thanka!

LukeCLindgren avatar Sep 19 '17 01:09 LukeCLindgren

It did not work:

[andrea@darius ~]$ lynx https://accounts.google.com/DisplayUnlockCaptcha [andrea@darius ~]$ gvoice Traceback (most recent call last): File "/usr/bin/gvoice", line 79, in login() File "/usr/bin/gvoice", line 49, in login voice.login(options.email,options.passwd) File "build/bdist.linux-x86_64/egg/googlevoice/voice.py", line 72, in login AttributeError: 'NoneType' object has no attribute 'group'

And since I can lynx to https://voice.google.com/messages from the command line on the same server and login fine, I don't think it's a setting with my google account.

andreawhitlock avatar Sep 19 '17 14:09 andreawhitlock

I initially installed the package from the Fedora dnf command. Then I downloaded the master zip file from here when I had errors and installed the local package with easy_install. It must not have overlaid everything or things got half-baked. I used pip uninstall to uninstall pygooglevoice and reinstalled from the master zip downloaded from here (using pip install). It's working now that I have a clean install.

andreawhitlock avatar Sep 25 '17 21:09 andreawhitlock

same issue here, ever since I added 2 factor authentication. I use an app password to send emails from the same server, but gvoice is failing.

rtaft avatar May 01 '18 15:05 rtaft

@rtaft It looks like app password doesn't work with gvoice because gvoice isn't using IMAP and SMTP (you can send emails with app password on SMTP), it's using http, and app passwords apparently don't work over http.

chris001 avatar May 01 '18 16:05 chris001