I’m getting this error for my schema.py:
Exception in thread django-main-thread:
Traceback (most recent call last):
File “C:\Python39\lib\threading.py”, line 954, in _bootstrap_inner
self.run()
File “C:\Python39\lib\threading.py”, line 892, in run
self._target(*self._args, **self._kwargs)
File “C:\Python39\lib\site-packages\django\utils\autoreload.py”, line 54, in wrapper
fn(*args, **kwargs)
File “C:\Python39\lib\site-packages\django\core\management\commands\runserver.py”, line 117, in inner_run
self.check(display_num_errors=True)
File “C:\Python39\lib\site-packages\django\core\management\base.py”, line 387, in check
all_issues = self._run_checks(
File “C:\Python39\lib\site-packages\django\core\management\base.py”, line 377, in run_checks
return checks.run_checks(**kwargs)
File “C:\Python39\lib\site-packages\django\core\checks\registry.py”, line 72, in run_checks
new_errors = check(app_configs=app_configs)
File “C:\Python39\lib\site-packages\django\core\checks\urls.py”, line 13, in check_url_config
return check_resolver(resolver)
File “C:\Python39\lib\site-packages\django\core\checks\urls.py”, line 23, in check_resolver
return check_method()
File “C:\Python39\lib\site-packages\django\urls\resolvers.py”, line 399, in check
for pattern in self.url_patterns:
File “C:\Python39\lib\site-packages\django\utils\functional.py”, line 80, in get
res = instance.dict[self.name] = self.func(instance)
File “C:\Python39\lib\site-packages\django\urls\resolvers.py”, line 584, in url_patterns
patterns = getattr(self.urlconf_module, “urlpatterns”, self.urlconf_module)
File “C:\Python39\lib\site-packages\django\utils\functional.py”, line 80, in get
res = instance.dict[self.name] = self.func(instance)
File “C:\Python39\lib\site-packages\django\urls\resolvers.py”, 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\urls.py”, line 19, in
from shop.schema import schema
File “C:\inetpub\wwwroot\Alternate-CMS\shop\schema.py”, line 701, in
class CatalogueOption(models.Model):
File “C:\Python39\lib\site-packages\django\db\models\base.py”, line 117, in new
new_class.add_to_class(’_meta’, Options(meta, app_label))
File “C:\Python39\lib\site-packages\django\db\models\base.py”, line 321, in add_to_class
value.contribute_to_class(cls, name)
File “C:\Python39\lib\site-packages\django\db\models\options.py”, 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 = (
"iso_3166_1_a2",
"iso_3166_1_a3",
"iso_3166_1_numeric",
"printable_name",
"name",
"display_order",
"is_shipping_country",
)
Any help would greatly appreciated.