Error on save
shawnzam opened this issue · 7 comments
shawnzam commented
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 commented
What version of Python/Django are you using?
shawnzam commented
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 commented
Got same issue, python 3.5 and Django 1.10.1
yeonsh commented
Same issue, python 3.5.2 and Django 1.10.1
DEKHTIARJonathan commented
Same issue, Python 3.7.1 and Django 1.10.7
VadymRud commented
Same issue, Python 3.6.1 and Django 1.11.1