Building a graphql schema but getting error when runserver

I’m getting this error for my

Exception in thread django-main-thread:
Traceback (most recent call last):
File “C:\Python39\lib\”, line 954, in _bootstrap_inner
File “C:\Python39\lib\”, line 892, in run
self._target(*self._args, **self._kwargs)
File “C:\Python39\lib\site-packages\django\utils\”, line 54, in wrapper
fn(*args, **kwargs)
File “C:\Python39\lib\site-packages\django\core\management\commands\”, line 117, in inner_run
File “C:\Python39\lib\site-packages\django\core\management\”, line 387, in check
all_issues = self._run_checks(
File “C:\Python39\lib\site-packages\django\core\management\”, line 377, in run_checks
return checks.run_checks(**kwargs)
File “C:\Python39\lib\site-packages\django\core\checks\”, line 72, in run_checks
new_errors = check(app_configs=app_configs)
File “C:\Python39\lib\site-packages\django\core\checks\”, line 13, in check_url_config
return check_resolver(resolver)
File “C:\Python39\lib\site-packages\django\core\checks\”, line 23, in check_resolver
return check_method()
File “C:\Python39\lib\site-packages\django\urls\”, line 399, in check
for pattern in self.url_patterns:
File “C:\Python39\lib\site-packages\django\utils\”, line 80, in get
res = instance.dict[] = self.func(instance)
File “C:\Python39\lib\site-packages\django\urls\”, line 584, in url_patterns
patterns = getattr(self.urlconf_module, “urlpatterns”, self.urlconf_module)
File “C:\Python39\lib\site-packages\django\utils\”, line 80, in get
res = instance.dict[] = self.func(instance)
File “C:\Python39\lib\site-packages\django\urls\”, line 577, in urlconf_module
return import_module(self.urlconf_name)
File "C:\Python39\lib\importlib_init
.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 855, in exec_module
File “”, line 228, in _call_with_frames_removed
File “C:\inetpub\wwwroot\Alternate-CMS\shop\”, line 19, in
from shop.schema import schema
File “C:\inetpub\wwwroot\Alternate-CMS\shop\”, line 701, in
class CatalogueOption(models.Model):
File “C:\Python39\lib\site-packages\django\db\models\”, line 117, in new
new_class.add_to_class(’_meta’, Options(meta, app_label))
File “C:\Python39\lib\site-packages\django\db\models\”, line 321, in add_to_class
value.contribute_to_class(cls, name)
File “C:\Python39\lib\site-packages\django\db\models\”, line 196, in contribute_to_class
raise TypeError("‘class Meta’ got invalid attribute(s): %s" % ‘,’.join(meta_attrs))
TypeError: ‘class Meta’ got invalid attribute(s): model,fields

I’m not sure how to get pass this issue. Here one of my models:

class AddressCountryType(DjangoObjectType):

class Meta:

  model = AddressCountry

  fields = (









Any help would greatly appreciated.

What libraries or packages are you using for this? As this isn’t something that is part of Django core, it would be helpful to get a much more complete description of your environment

i’m using:

Windows 10 Pro
Custom Built content management system built on Django-CMS & Oscar Commerce

see here for full project: bastianhilton/Alternate-CMS: Alternate CMS combines the power, extendibility, scalability, and security that Python and Django is known for. While building itself as a headless solution for any business small to enterprise. (

i’m using graphql module = Graphene
Files i’ve created includes and after following:

I found the solution, turns out that the issue lied within my One of my models didn’t have DjangoObjectType, instead it had model.models. Once corrected, the error went away.