django-nonrel / djangotoolbox

Django tools for building nonrel backends

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

interpegasus opened this issue · comments

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'>

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

$ git checkout c216d13

Thanks

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.

Any news?

@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.

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)

Thanks for the update. This issue is still present.

django-nonrel/djangoappengine#108

A new issue has been created on djangoappengine