SOLVED SMS with Google Voice WORKING (sometimes for some people)

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
@chris_c_: You seem to be doing the lion's share of work on this project now. Why not just fork the pettazz repo and apply the updates?? Pettazz doesn't seem overly interested any more.
 

chris_c_

Active Member
Joined
Aug 19, 2010
Messages
509
Reaction score
67
@wardmundy Good point. Nick merged the previous fix in March right away, this is the first time he's gone missing for almost a week now, he might just be on vacation without laptop and without email notifications on the phone, some people are that way. Giving it a couple of days and if no reply, we have no choice except to fork it and Nick can be invited as a member with commit privileges. The reason to be reluctant to fork a repo on github is you lose the history of all the issues reported in the past on his repo, so you lose that knowledge base to search on and build on. Keeping it alive is a good thing, it's a good little app and very handy for automating the goodness of GV. As long as you don't mind zero privacy as GV shares all text and voice with any authorized entity who pays them, what a world, same as for all phone companies though.
 
Last edited:

chris_c_

Active Member
Joined
Aug 19, 2010
Messages
509
Reaction score
67
Haha.. again. I don't believe they're intentionally breaking the app on purpose. They're just making their GVoice pages use more and more of their framework's auto generated javascript so that it feels more and more like a mobile smart phone app in any browser, while this python app is made to process HTML.
 

Captain Mike

New Member
Joined
May 22, 2017
Messages
6
Reaction score
3
New error stacktrace:

Traceback (most recent call last):
File "./google_voice_sms.py", line 20, in <module>
voice.login(username, password)
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 75, in login
galx = re.search(r"type=\"hidden\"\s+name=\"GALX\"\s+value=\"(.+)\"", content).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

Please let us know if there is an update to correct this.
 

chris_c_

Active Member
Joined
Aug 19, 2010
Messages
509
Reaction score
67
Yes @Captain Mike - we fixed this recent issue - GV removed a variable from the page - try this version:

cd ~
git clone https://github.com/EspaceNetworks/pygooglevoice
cd pygooglevoice
python setup.py install
cp -p bin/gvoice /usr/bin/.
pip install --upgrade BeautifulSoup
exit


For any OS where pip is not installed, you can install pip (yum install pip or apt install pip), or do:
easy_install -U BeautifulSoup
 

Captain Mike

New Member
Joined
May 22, 2017
Messages
6
Reaction score
3
@chris_c_
I have an error while running the setup.py script within python 2.7:

[root@pbr pygooglevoice]# python setup.py install
running install
running build
running build_py
copying googlevoice/google_voice_sms.py -> build/lib/googlevoice
running build_scripts
running install_lib
copying build/lib/googlevoice/google_voice_sms.py -> /usr/lib/python2.7/site-packages/googlevoice
byte-compiling /usr/lib/python2.7/site-packages/googlevoice/voice.py to voice.pyc
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 85
content = self.__do_page('login', {'smsToken': smsToken, 'service': "grandcentral", )) #'GALX': galx})
^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python2.7/site-packages/googlevoice/google_voice_sms.py to google_voice_sms.pyc
Sorry: IndentationError: unexpected indent (google_voice_sms.py, line 2)
running install_scripts
copying build/scripts-2.7/gvoice -> /usr/bin
changing mode of /usr/bin/gvoice to 755
changing mode of /usr/bin/gvi to 755
changing mode of /usr/bin/asterisk-gvoice-setup to 755
running install_egg_info
Removing /usr/lib/python2.7/site-packages/pygooglevoice-0.5-py2.7.egg-info
Writing /usr/lib/python2.7/site-packages/pygooglevoice-0.5-py2.7.egg-info

What would I need to do to get the install to work?
 
Last edited by a moderator:

Captain Mike

New Member
Joined
May 22, 2017
Messages
6
Reaction score
3
@chris_c_
I have an error while running the setup.py script within python 2.7:

[root@pbr pygooglevoice]# python setup.py install
running install
running build
running build_py
copying googlevoice/google_voice_sms.py -> build/lib/googlevoice
running build_scripts
running install_lib
copying build/lib/googlevoice/google_voice_sms.py -> /usr/lib/python2.7/site-packages/googlevoice
byte-compiling /usr/lib/python2.7/site-packages/googlevoice/voice.py to voice.pyc
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 85
content = self.__do_page('login', {'smsToken': smsToken, 'service': "grandcentral", )) #'GALX': galx})
^
SyntaxError: invalid syntax

byte-compiling /usr/lib/python2.7/site-packages/googlevoice/google_voice_sms.py to google_voice_sms.pyc
Sorry: IndentationError: unexpected indent (google_voice_sms.py, line 2)
running install_scripts
copying build/scripts-2.7/gvoice -> /usr/bin
changing mode of /usr/bin/gvoice to 755
changing mode of /usr/bin/gvi to 755
changing mode of /usr/bin/asterisk-gvoice-setup to 755
running install_egg_info
Removing /usr/lib/python2.7/site-packages/pygooglevoice-0.5-py2.7.egg-info
Writing /usr/lib/python2.7/site-packages/pygooglevoice-0.5-py2.7.egg-info

What would I need to do to get the install to work?

I was able to fix the SyntaxError mentioned above on line 85 as follows:
content = self.__do_page('login', {'smsToken': smsToken, 'service': "grandcentral", )) #'GALX': galx})
with content = self.__do_page('login', {'smsToken': smsToken, 'service': "grandcentral", 'GALX': galx})
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
For those running Incredible PBX/Fax for Raspberry Pi 3 or Pi Zero W, here's the simple update procedure. Login with SSH as root and issue the following commands. Then logout (exit) and log back in with SSH. Done.
Code:
chattr -i /etc/pbx/.update-guiU25
rm /etc/pbx/.update-guiU25
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
DC3dYUZW0AANkb5.jpg


For those running Incredible PBX for Wazo or XiVO, here's the simple update procedure. Login with SSH as root and issue the following commands. Then logout (exit) and log back in with SSH. Done.
Code:
chattr -i /etc/pbx/.updatexivo2
rm /etc/pbx/.updatexivo2
 
Last edited:

chris_c_

Active Member
Joined
Aug 19, 2010
Messages
509
Reaction score
67
In case anyone was trying to use the 2-step authentication, it's broken, and appears to need rewriting, in light of the new version of GVoice.

Now is as good time as any to announce that I invite a everyone who is using this software and enjoying my recent bug fixes and feature additions, to visit my gofundme page, where anyone who is interested in supporting my serious efforts to fix and develop this software further, can make a contribution to help cover my running costs.

Thank you to everyone who will support. It's because of you that I can do this and make this software work again!

https://www.gofundme.com/espacenetworks-pygooglevoice
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
@chris_c_ Thought this might provide a clue. When I chose to try the login again, I got this:
Code:
Login failed. Retry?[Y/n] y
Traceback (most recent call last):
  File "/usr/bin/gvoice", line 79, in <module>
    login()
  File "/usr/bin/gvoice", line 55, in login
    login(None, None, batch)
  File "/usr/bin/gvoice", line 49, in login
    voice.login(options.email,options.passwd)
  File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 76, in login
    gxf = re.search(r"type=\"hidden\"\s+name=\"gxf\"\s+value=\"(.+)\"", content).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
 

Captain Mike

New Member
Joined
May 22, 2017
Messages
6
Reaction score
3
Sorry I have no idea what to do with the following stack trace. It just started happening yesterday afternoon. Yesterday morning pygoogle works fine though.

Traceback (most recent call last):
File "./google_voice_sms.py", line 25, in <module>
send_mass_text ()
File "./google_voice_sms.py", line 23, in send_mass_text
voice.send_sms(this_phone_number, the_message)
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 192, in send_sms
self.__validate_special_page('sms', {'phoneNumber': phoneNumber, 'text': text})
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 289, in __validate_special_page
load_and_validate(self.__do_special_page(page, data))
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 302, in __do_special_page
return self.__do_page(page, data, headers, terms)
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 282, in __do_page
return urlopen(Request(pageuri, data, headers))
File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python2.7/urllib2.py", line 438, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 551, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 476, in error
return self._call_chain(*args)
File "/usr/lib64/python2.7/urllib2.py", line 410, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 559, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: Internal Server Error
 

chris_c_

Active Member
Joined
Aug 19, 2010
Messages
509
Reaction score
67
Sorry I have no idea what to do with the following stack trace. It just started happening yesterday afternoon. Yesterday morning pygoogle works fine though.

Traceback (most recent call last):
File "./google_voice_sms.py", line 25, in <module>
send_mass_text ()
File "./google_voice_sms.py", line 23, in send_mass_text
voice.send_sms(this_phone_number, the_message)
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 192, in send_sms
self.__validate_special_page('sms', {'phoneNumber': phoneNumber, 'text': text})
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 289, in __validate_special_page
load_and_validate(self.__do_special_page(page, data))
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 302, in __do_special_page
return self.__do_page(page, data, headers, terms)
File "/usr/lib/python2.7/site-packages/googlevoice/voice.py", line 282, in __do_page
return urlopen(Request(pageuri, data, headers))
File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python2.7/urllib2.py", line 438, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 551, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 476, in error
return self._call_chain(*args)
File "/usr/lib64/python2.7/urllib2.py", line 410, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 559, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: Internal Server Error
Could you post this on:
https://github.com/EspaceNetworks/pygooglevoice/issues/new
1. What's the content of the text message being sent by your "send_mass_text()" function (remove personal information)?
2. The source of "send_mass_text()" ?
3. Is anyone of your recipients replying to your mass text message?
 

Members online

No members online now.

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top