Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: Message ID not a SHA1 hash. #29

Open
chris001 opened this issue Sep 28, 2016 · 2 comments
Open

AssertionError: Message ID not a SHA1 hash. #29

chris001 opened this issue Sep 28, 2016 · 2 comments

Comments

@chris001
Copy link

chris001 commented Sep 28, 2016

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 chris001 changed the title Crash AssertionError: Message ID not a SHA1 hash. Sep 28, 2016
@Geremia
Copy link

Geremia commented Jun 9, 2017

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).

seansweda added a commit to seansweda/pygooglevoice that referenced this issue Aug 18, 2017
seansweda added a commit to seansweda/pygooglevoice that referenced this issue Jun 28, 2018
@jaraco
Copy link
Contributor

jaraco commented Aug 31, 2018

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

jaraco pushed a commit to jaraco/googlevoice that referenced this issue Aug 28, 2022
This change adds `nitpicky=True` (which is an equivalent of `-n`) to
make Sphinx emit warnings for any references to non-existing targets.
Then, it adds `-W` to make it fail whenever a single warning is seen.
Finally, `--keep-going` allows Sphinx to print out all the warnings
before exiting instead of showing just one and bailing.

Resolves pettazz#29

Refs:
* https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-n
* https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-W
* https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-keep-going
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants