carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

Stacktrace from xmltools.parseAndStripWhitespace(key.pem) #488

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Code: See attachment
2. Add keys using cygwin/openssl. Upload cert to google, save key in 
/remotekey.pem
3. Start application

What is the expected output? What do you see instead?
I expected to see a link letting the user authorize a request token.
Instead I got an stack trace:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 515, in __call__
    handler.get(*groups)
  File "C:\Users\Joshua\appengineapps\jmm-timeline\main.py", line 64, in get
    req_token = client.FetchOAuthRequestToken(SCOPES)
  File "C:\Users\Joshua\appengineapps\jmm-timeline\gdata\service.py", line 415, in FetchOAuthRequestToken
    extra_parameters=extra_parameters)
  File "C:\Users\Joshua\appengineapps\jmm-timeline\gdata\auth.py", line 217, in GenerateOAuthRequestTokenUrl
    oauth_input_params.GetConsumer(), None)
  File "C:\Users\Joshua\appengineapps\jmm-timeline\gdata\oauth\__init__.py", line 171, in sign_request
    self.set_parameter('oauth_signature', self.build_signature(signature_method, consumer, token))
  File "C:\Users\Joshua\appengineapps\jmm-timeline\gdata\oauth\__init__.py", line 175, in build_signature
    return signature_method.build_signature(self, consumer, token)
  File "C:\Users\Joshua\appengineapps\jmm-timeline\gdata\oauth\rsa.py", line 55, in build_signature
    privatekey = keyfactory.parsePrivateKey(cert)
  File "C:\Users\Joshua\appengineapps\jmm-timeline\gdata\tlslite\utils\keyfactory.py", line 203, in parsePrivateKey
    return parseXMLKey(s, private=True)
  File "C:\Users\Joshua\appengineapps\jmm-timeline\gdata\tlslite\utils\keyfactory.py", line 79, in parseXMLKey
    key = Python_RSAKey.parseXML(s)
  File "C:\Users\Joshua\appengineapps\jmm-timeline\gdata\tlslite\utils\Python_RSAKey.py", line 137, in parseXML
    element = xmltools.parseAndStripWhitespace(s)
  File "C:\Users\Joshua\appengineapps\jmm-timeline\gdata\tlslite\utils\xmltools.py", line 30, in parseAndStripWhitespace
    raise SyntaxError(str(e))
SyntaxError: Parse() argument 1 must be string or read-only buffer, not None

Original issue reported on code.google.com by joshua.m...@gmail.com on 17 Jan 2011 at 9:37

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by vicfry...@google.com on 18 Jan 2011 at 11:52