title: googlevoice will not programmatically login (Python)
body: <p>I am getting the following error traceback when my program tries to login to GoogleVoice (<code>from googlevoice import Voice, util</code>) to send SMS message.</p>
  
  <pre><code>    File "C:\Users\ble1usb\Dropbox\Git\ers-dataanalyzzer\MainFrame.py", line 38, in call_mainframe
      ah.compare_status() # compares current status with historical status. alerts alarm team if necessary
    File "C:\Users\ble1usb\Dropbox\Git\ers-dataanalyzzer\alarm_handler.py", line 61, in compare_status
      self.megaphone = megaphone.MegaPhone()     # Am I going to have problems putting this here? I am getting relentless login fails due to the shitty googlevoice login
    File "C:\Users\ble1usb\Dropbox\Git\ers-dataanalyzzer\megaphone.py", line 18, in __init__
      self.voice.login(bl_google_credentials[0], bl_google_credentials[1])
    File "C:\Python27\lib\site-packages\googlevoice\voice.py", line 70, in login
      galx = re.search(r"name=\"GALX\"\s+value=\"(.+)\"", content).group(1)
  
  AttributeError: 'NoneType' object has no attribute 'group'
  </code></pre>
  
  <p>My program has been running successfully for the last several weeks. Every once in a while, the above error would get thrown and the error handling would just try again. Now, it has not had a successful login in several hundred tries.</p>
  
  <p>One issue that I feel may be important is that the program was logging in every ten (10) minutes regardless of whether or not an SMS was sent (rare case, every few days at most).</p>
  
  <p>In the above traceback, You can see that I moved the function call that performed the GoogleVoice login to within the loop only in case its needed. It is still having problems because there is an alarm notification that needs to be sent out. </p>
  
  <p>I tried logging in and out of my Google account, no avail.</p>
  
  <p>Here's a clue --> the following code was copied out of the file identified in the last line of the traceback (source of error):</p>
  
  <pre><code>def login(self, email=None, passwd=None):
          """
          Login to the service using your Google Voice account
          Credentials will be prompted for if not given as args or in the ``~/.gvoice`` config file
          """
          if hasattr(self, '_special') and getattr(self, '_special'):
              return self
  
      if email is None:
          email = config.email
      if email is None:
          email = input('Email address: ')
  
      if passwd is None:
          passwd = config.password
      if passwd is None:
          from getpass import getpass
          passwd = getpass()
  
      content = self.__do_page('login').read()
      # holy hackjob
      galx = re.search(r"name=\"GALX\"\s+value=\"(.+)\"", content).group(1)
      self.__do_page('login', {'Email': email, 'Passwd': passwd, 'GALX': galx})
  
      del email, passwd
  
      try:
          assert self.special
      except (AssertionError, AttributeError):
          raise LoginError
  
      return self
  </code></pre>
  
  <p>We should note that</p>
  
  <p><code>galx = re.search(r"name=\"GALX\"\s+value=\"(.+)\"", content).group(1)</code> </p>
  
  <p>is the source of the error and that (this is important) the line immediately above it says </p>
  
  <p><code># holy hackjob</code></p>