pygooglevoice icon indicating copy to clipboard operation
pygooglevoice copied to clipboard

AssertionError: Message ID not a SHA1 hash.

Open chris001 opened this issue 9 years ago • 2 comments

The code crashes in certain cases, on a normal google voice mailbox. Message ID not a SHA1 hash

~pygooglevoice/examples # python voicemail.py
Traceback (most recent call last):
  File "voicemail.py", line 6, in <module>
    for message in voice.voicemail().messages:
  File "/usr/lib/python2.7/site-packages/googlevoice/util.py", line 242, in messages
    return [Message(self, *i) for i in self['messages'].items()]
  File "/usr/lib/python2.7/site-packages/googlevoice/util.py", line 181, in __init__
    assert is_sha1(id), 'Message id not a SHA1 hash'
AssertionError: Message id not a SHA1 hash

The examples which crash are:

  1. download-mp3.py
  2. folders.py
  3. voicemail.py

Working example: parse_sms.py , it's using BeautifulSoup to handle the html page processing, instead of simple regular expression text search.

chris001 avatar Sep 28 '16 17:09 chris001

I get this problem, too. I just commented out assert is_sha1(id), 'Message id not a SHA1 hash' (line 181 in util.py). Google changed the format of the IDs to things like this: "#PXQKZLLYITXJMRHUISINUKJPVZTGOVOTXVJISJWT_0" (which isn't even a SHA1 hash, as it's purely non-numeric).

Geremia avatar Jun 09 '17 02:06 Geremia

This ticket is a duplicate of #4 and is now fixed in the master.

jaraco avatar Aug 31 '18 20:08 jaraco