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

DatabaseError: Unsupported type for property : <class 'django.utils.safestring.SafeText'> #65

Open
interpegasus opened this issue Jul 24, 2015 · 6 comments

Comments

@interpegasus
Copy link

Hi, The server gets the following error after updating to the latest code in the master branch. Any ideas on how to fix it? Thanks

File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/datastore.py", line 1766, in __setitem__
    datastore_types.ValidateProperty(' ', value)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/datastore_types.py", line 1547, in ValidateProperty
    'Unsupported type for property %s: %s' % (name, v.__class__))
DatabaseError: Unsupported type for property  : <class 'django.utils.safestring.SafeText'>
@interpegasus
Copy link
Author

Please let me know how to avoid reverting and using the latest code. During the meanwhile, reverting fixes the issue:

$ git checkout c216d13

Thanks

@kavdev
Copy link
Contributor

kavdev commented Jul 26, 2015

In that particular code fragment, the GAE plugin is doing some validation on the value and isn't accounting for SafeText. I'm guessing whatever app connects to GAE should be normalizing strings before sending them off.

Is that the full traceback? Are you using this engine? Note that per the new API changes in djangotoolbox 1.8, engine maintainers will probably need to make some changes before upgrading to the latest version.

@kavdev
Copy link
Contributor

kavdev commented Aug 11, 2015

Any news?

@interpegasus
Copy link
Author

@kavdev Thanks for your help.

Yes I am using the master branch of django app engine. I am also using django nonrel 1.6 and the master branch of all the other django relevant rerposiotires.

I would like to know if Is there a branch combination that I should try to make it work? Thanks.

@kavdev
Copy link
Contributor

kavdev commented Sep 1, 2015

What version of Django are you running? The commit you mentioned on July 24th will work with Django < 1.8.

If you're trying to run Django 1.8, djangotoolbox won't work with djangoappengine at the moment. The maintainer of djangoappengine would need to fix the bug. I'd say make an issue on that package's page and provide this link: #65 (comment)

@interpegasus
Copy link
Author

Thanks for the update. This issue is still present.

django-nonrel/djangoappengine#108

A new issue has been created on djangoappengine

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

2 participants