#27114: Migrations: AttributeError: can't set attribute
----------------------------+--------------------------------------------
Reporter: sweaver360 | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.10
Severity: Normal | Keywords: AttributeError Migrations 1.10
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------------
I just updated to Django 1.10 from Django 1.9.9, and when I ran my server
it told me I needed to migrate due to a change in auth. When I ran
manage.py migrate, I get the following error:
{{{
vagrant@vagrant-box:~/website$ python manage.py migrate
System check identified some issues:
WARNINGS:
?: (mysql.W002) MySQL Strict Mode is not set for database connection
'default'
HINT: MySQL's Strict Mode fixes many data integrity problems in
MySQL, such as data truncation upon insertion, by escalating warnings into
errors. It is strongly recommended you activate it. See:
https://docs.djangoproject.com/en/1.10/ref/databases/#mys
ql-sql-mode
myapp.MyModel.my_field: (fields.W901) CommaSeparatedIntegerField has been
deprecated. Support for it (except in historical migrations) will be
removed in Django 2.0.
HINT: Use
CharField(validators=[validate_comma_separated_integer_list]) instead.
Operations to perform:
Apply all migrations: [...]
Running migrations:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-
packages/django/core/management/__init__.py", line 367, in
execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-
packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-
packages/django/core/management/base.py", line 305, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python2.7/dist-
packages/django/core/management/base.py", line 356, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-
packages/django/core/management/commands/migrate.py", line 202, in handle
targets, plan, fake=fake, fake_initial=fake_initial
File "/usr/local/lib/python2.7/dist-
packages/django/db/migrations/executor.py", line 97, in migrate
state = self._migrate_all_forwards(plan, full_plan, fake=fake,
fake_initial=fake_initial)
File "/usr/local/lib/python2.7/dist-
packages/django/db/migrations/executor.py", line 138, in
_migrate_all_forwards
migration.mutate_state(state, preserve=False)
File "/usr/local/lib/python2.7/dist-
packages/django/db/migrations/migration.py", line 92, in mutate_state
operation.state_forwards(self.app_label, new_state)
File "/usr/local/lib/python2.7/dist-
packages/django/db/migrations/operations/models.py", line 733, in
state_forwards
state.reload_model(app_label, self.name_lower)
File "/usr/local/lib/python2.7/dist-
packages/django/db/migrations/state.py", line 162, in reload_model
self.apps.render_multiple(states_to_be_rendered)
File "/usr/local/lib/python2.7/dist-
packages/django/db/migrations/state.py", line 277, in render_multiple
model.render(self)
File "/usr/local/lib/python2.7/dist-
packages/django/db/migrations/state.py", line 559, in render
body,
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py",
line 157, in __new__
new_class.add_to_class(obj_name, obj)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py",
line 316, in add_to_class
value.contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-
packages/django/db/models/manager.py", line 120, in contribute_to_class
setattr(model, name, ManagerDescriptor(self))
AttributeError: can't set attribute
}}}
As far as I could tell, the code in the stack trace is all Django code, so
I don't think it's a bad site package. Is it possible that something in
my code needs to change to prevent this error, or is this a Django bug?
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/27114>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.e6bf30a22a6a11f22bb0c5e80236ac80%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.