amirpk / gdata-python-client

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

It must be kidding! parseAndStripWhitespace in xmltools.py #273

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I try out code sample below, it says that there's a synax error:
  File "E:\Workspace\525687\gdata\tlslite\utils\xmltools.py", line 30, in 
parseAndStripWhitespace
    raise SyntaxError(str(e))
SyntaxError: syntax error: line 1, column 0

and I found the code for parseAndStripWhitespace is:
stream = java.io.ByteArrayInputStream(java.lang.String(s).getBytes())
This is Java code right? 

Anybody help me out!
P.S. it there any possible it has something to do with my pem file?
the code sample is:
import gdata.auth
import gdata.docs.service

CONSUMER_KEY = '525687.appspot.com'
SIG_METHOD = gdata.auth.OAuthSignatureMethod.RSA_SHA1

f = open(r'C:\myrsacert.pem')
RSA_KEY = f.read()
f.close()

client = gdata.docs.service.DocsService(source='yourCompany-YourAppName-
v1')
client.SetOAuthInputParameters(SIG_METHOD, CONSUMER_KEY, rsa_key=RSA_KEY)

SCOPES = ['http://docs.google.com/feeds/', 
'http://www.google.com/calendar/feeds/']  # example of a multi-scoped token
req_token = client.FetchOAuthRequestToken(scopes=SCOPES)
client.SetOAuthToken(req_token)

Original issue reported on code.google.com by yucc2...@gmail.com on 8 Aug 2009 at 7:45

GoogleCodeExporter commented 9 years ago
I just can't belive this if it's turns out to be a typo!

Original comment by yucc2...@gmail.com on 8 Aug 2009 at 7:47

GoogleCodeExporter commented 9 years ago
Will confirm and fix tomorrow if this is still an issue.

Original comment by vicfry...@google.com on 29 Jun 2010 at 8:27

GoogleCodeExporter commented 9 years ago
Confirmed, lol.  Will fix this now.

Original comment by vicfry...@google.com on 30 Jun 2010 at 7:21

GoogleCodeExporter commented 9 years ago
Read into this a little deeper, this code is valid.  This is contrib code 
likely from something that also works in jython.  I'm changing around the if 
statement to make this more readable.

@yucc2008:  The issue was indeed something you were parsing.

Original comment by vicfry...@google.com on 30 Jun 2010 at 7:30

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/1739044

Original comment by vicfry...@google.com on 30 Jun 2010 at 7:33

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/gdata-python-client/source/detail?r=999  Although I 
did some code clean-up, still marking this wontfix, no issue here.

Original comment by vicfry...@google.com on 30 Jun 2010 at 8:02