question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'NoneType' object has no attribute '_meta'

See original GitHub issue

I have simple graphene based django project: https://github.com/aliev/graphene-django-bug

For some reason when I’m trying to run server or make migrations I have an exception:

AttributeError: 'NoneType' object has no attribute '_meta'

I’m using model forms and DjangoModelFormMutation

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:17 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
tpictcommented, Mar 1, 2019

I’m having the same issue with the rest framework SerializerMutation

4reactions
PeterDekkerscommented, Jun 4, 2019

I’ve narrowed it down to that I need to import only those types that have a relation (ForeignKey or OneToOne) to another type. Would you like me to provide a simple example to reproduce the issue, would that help?

Read more comments on GitHub >

github_iconTop Results From Across the Web

'NoneType' object has no attribute '_meta' - Stack Overflow
Python is trying to find the field _meta in self.model. When it says that NoneType does not have that attribute, it means that...
Read more >
'NoneType' object has no attribute '_meta' in manage.py ...
In 1.10rc1 I get the following when running ./manage.py dumpdata auth.user --traceback :: [Traceback (most recent call last): File "./manage.py", line 11, ...
Read more >
[Django] #21040: Bug in db/models/base.py, 'NoneType ...
AttributeError : 'NoneType' object has no attribute 'attname'. Because a model can be 'abstract = True' doesn't have a pk, but a form...
Read more >
AttributeError : 'NoneType' object has no attribute '_meta'-django
Coding example for the question AttributeError : 'NoneType' object has no attribute '_meta'-django.
Read more >
AttributeError: 'NoneType' object has no attribute '_meta'
Discussion: AttributeError: 'NoneType' object has no attribute '_meta' - during South migration. Dave E. 12 years ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found