1ap / google-api-python-client

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

cannot concatenate 'str' and 'NoneType' objects #306

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have modified the Google+ quick start for Python 
(https://developers.google.com/+/quickstart/python) code a little to include 
webapp2 and store credentials in datastore. 

But when trying to put credentials in datastore, I get the following error: 

TypeError: cannot concatenate 'str' and 'NoneType' objects

What steps will reproduce the problem?
1. Get credentials object with authorization code: 
credentials = oauth_flow.step2_exchange(code)
2. Instantiate Storage: 
storage = StorageByKeyName(User, gplus_id, 'google_credentials')
3. Save credentials in datastore: 
storage.put(credentials)

What is the expected output? What do you see instead?
Expected output: Save credentials in datastore. Instead I see error in App 
Engine logs.

What version of the product are you using? On what operating system?
Google API Python Client GAE 1.2 / App Engine Python SDK 1.8.2 / Windows 7

Please provide any additional information below.

Original issue reported on code.google.com by ismael....@gmail.com on 16 Oct 2013 at 12:35

Attachments:

GoogleCodeExporter commented 8 years ago
i am facing same problem.
anyone can help me ?

Original comment by nikhil.m...@searce.com on 12 Nov 2013 at 12:46

GoogleCodeExporter commented 8 years ago
You need to use CredentialsNDBProperty not CredentialsProperty

Original comment by ghow...@ancoris.com on 14 May 2015 at 8:54