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

Error on save #22

Open
shawnzam opened this issue Aug 25, 2016 · 7 comments
Open

Error on save #22

shawnzam opened this issue Aug 25, 2016 · 7 comments

Comments

@shawnzam
Copy link

shawnzam commented Aug 25, 2016

I am getting the following error when trying to do a create

[Wed Aug 24 16:18:39 2016] [error]   File "/home/vagrant/.virtualenvs/turktools/lib/python3.4/site-packages/encrypted_fields/fields.py", line 163, in to_python
[Wed Aug 24 16:18:39 2016] [error]     if value is None or not isinstance(value, types.StringTypes):
[Wed Aug 24 16:18:39 2016] [error] AttributeError: 'module' object has no attribute 'StringTypes'

Full trace:
http://dpaste.com/0SWTFF9

with my models.py setup:

from django.db import models
from django.contrib.auth.models import User
from encrypted_fields import EncryptedCharField


class Profile(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)
    aws_key = EncryptedCharField(max_length=50)
    aws_secret_key = EncryptedCharField(max_length=50)

Any ideas?

[UPDATE:] I added a pull request: #23

@defrex
Copy link
Owner

defrex commented Aug 25, 2016

What version of Python/Django are you using?

@shawnzam
Copy link
Author

shawnzam commented Aug 25, 2016

Django Version: 1.9.9
Python Version: 3.4.4

The pull request I submitted works with these versions. But they break support for < versions.

@aleosd
Copy link

aleosd commented Sep 20, 2016

Got same issue, python 3.5 and Django 1.10.1

@yeonsh
Copy link

yeonsh commented Oct 13, 2016

Same issue, python 3.5.2 and Django 1.10.1

@DEKHTIARJonathan
Copy link

Same issue, Python 3.7.1 and Django 1.10.7

@VadymRud
Copy link

VadymRud commented Jul 5, 2017

Same issue, Python 3.6.1 and Django 1.11.1

@defrex
Copy link
Owner

defrex commented Jul 14, 2017

I have a PR open to port to Python 3 (#27). Unfortunately it's blocked upstream by keyczar.

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

6 participants