django 2.0 'TaggableRel' object has no attribute 'related_query_name'
See original GitHub issue./manage.py migrate
seems to crash since https://github.com/django/django/commit/9f4e0fde0a25ae0c21359f5194435aaf5ca341c7
Traceback (most recent call last):
File "./manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "django/core/management/__init__.py", line 348, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "django/core/management/base.py", line 280, in run_from_argv
self.execute(*args, **cmd_options)
File "django/core/management/base.py", line 327, in execute
output = self.handle(*args, **options)
File "django/core/management/commands/migrate.py", line 160, in handle
pre_migrate_apps = pre_migrate_state.apps
File "django/utils/functional.py", line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "django/db/migrations/state.py", line 210, in apps
return StateApps(self.real_apps, self.models)
File "django/db/migrations/state.py", line 275, in __init__
self.render_multiple(list(models.values()) + self.real_models)
File "django/db/migrations/state.py", line 310, in render_multiple
model.render(self)
File "django/db/migrations/state.py", line 572, in render
body = {name: field.clone() for name, field in self.fields}
File "django/db/migrations/state.py", line 572, in <dictcomp>
body = {name: field.clone() for name, field in self.fields}
File "django/db/models/fields/__init__.py", line 468, in clone
name, path, args, kwargs = self.deconstruct()
File "taggit/managers.py", line 410, in deconstruct
name, path, args, kwargs = super(TaggableManager, self).deconstruct()
File "django/db/models/fields/related.py", line 327, in deconstruct
if self.remote_field.related_query_name is not None:
AttributeError: 'TaggableRel' object has no attribute 'related_query_name'
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Django 2.0.3 AttributeError: 'Manager' object has no attribute ...
I am using git to sync and it thinks the code is the same. What could be different that means it works on...
Read more >Django 4.0 release notes
assertHTMLEqual() no longer considers a non-boolean attribute without a value equal to an attribute with the same name and value. Tests that ...
Read more >fix AttributeError: 'TaggableRel' object has no attribute 'to ...
@@ -326,6 +326,7 @@ class TaggableManagerTestCase(BaseTaggingTestCase):. # Check if tag field, which simulates m2m, has django-like api.
Read more >[Django] #33948: 'Response' object has no attribute 'headers'
configured clickjacking middleware in django project like below. We were not getting this error while using Django 2.0.4. But now we have ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Adding
related_query_name = None
to TaggableRel seems to fix it, though I’m not sure if that should be set to something better.‘TaggableRel’ object has no attribute ‘related_query_name’ for 2.2.26,I have added self.related_query_name = None