Sequence of related errors while using the command manage.py runserver

51 views
Skip to first unread message

Nanu Iyer

unread,
Dec 29, 2022, 5:57:45 AM12/29/22
to django-oscar
I'm attempting to integrate django-oscar(https://github.com/django-oscar/django-oscar) into my exiting project which is a blog api running through docker. I've downloaded the code and integrated it. However , I'm getting the following errors which are in sequence and related to each other:

_parse plural = v[1].split('plural=')[1]
IndexError: list index out of range

in get_app_config
    return self.app_configs[app_label]
KeyError: 'search'

LookupError: No installed app with label 'search'.

The detailed trace is as follows :


    (myEnv) earthling@myinstance-1:~/my-api$ python3.8 manage.py runserver
    2022-12-29 03:43:04,694 asyncio      DEBUG    Using selector: EpollSelector
    2022-12-29 03:43:05,303 botocore.hooks DEBUG    Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
    2022-12-29 03:43:05,305 botocore.hooks DEBUG    Changing event name from before-call.apigateway to before-call.api-gateway
    2022-12-29 03:43:05,306 botocore.hooks DEBUG    Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
    2022-12-29 03:43:05,307 botocore.hooks DEBUG    Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
    2022-12-29 03:43:05,307 botocore.hooks DEBUG    Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
    2022-12-29 03:43:05,308 botocore.hooks DEBUG    Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
    2022-12-29 03:43:05,308 botocore.hooks DEBUG    Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
    2022-12-29 03:43:05,311 botocore.hooks DEBUG    Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
    2022-12-29 03:43:05,311 botocore.hooks DEBUG    Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
    2022-12-29 03:43:05,311 botocore.hooks DEBUG    Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
    2022-12-29 03:43:05,311 botocore.hooks DEBUG    Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
    2022-12-29 03:43:05,315 botocore.utils DEBUG    IMDS ENDPOINT: http://169.254.169.254/
    2022-12-29 03:43:05,317 botocore.credentials DEBUG    Looking for credentials via: env
    2022-12-29 03:43:05,317 botocore.credentials DEBUG    Looking for credentials via: assume-role
    2022-12-29 03:43:05,317 botocore.credentials DEBUG    Looking for credentials via: assume-role-with-web-identity
    2022-12-29 03:43:05,317 botocore.credentials DEBUG    Looking for credentials via: sso
    2022-12-29 03:43:05,317 botocore.credentials DEBUG    Looking for credentials via: shared-credentials-file
    2022-12-29 03:43:05,317 botocore.credentials DEBUG    Looking for credentials via: custom-process
    2022-12-29 03:43:05,318 botocore.credentials DEBUG    Looking for credentials via: config-file
    2022-12-29 03:43:05,318 botocore.credentials DEBUG    Looking for credentials via: ec2-credentials-file
    2022-12-29 03:43:05,318 botocore.credentials DEBUG    Looking for credentials via: boto-config
    2022-12-29 03:43:05,318 botocore.credentials DEBUG    Looking for credentials via: container-role
    2022-12-29 03:43:05,318 botocore.credentials DEBUG    Looking for credentials via: iam-role
    2022-12-29 03:43:05,319 urllib3.connectionpool DEBUG    Starting new HTTP connection (1): 169.254.169.254:80
    2022-12-29 03:43:05,322 urllib3.connectionpool DEBUG    http://169.254.169.254:80 "PUT /latest/api/token HTTP/1.1" 405 1604
    2022-12-29 03:43:05,324 urllib3.connectionpool DEBUG    http://169.254.169.254:80 "GET /latest/meta-data/iam/security-credentials/ HTTP/1.1" 404 1603
    2022-12-29 03:43:05,324 botocore.utils DEBUG    Metadata service returned non-200 response with status code of 404 for url: http://169.254.169.254/latest/meta-data/iam/security-credentials/, content body: b'<!DOCTYPE html>\n<html lang=en>\n  <meta charset=utf-8>\n  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\n  <title>Error 404 (Not Found)!!1</title>\n  <style>\n    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}\n  </style>\n  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\n  <p><b>404.</b> <ins>That\xe2\x80\x99s an error.</ins>\n  <p>The requested URL <code>/latest/meta-data/iam/security-credentials/</code> was not found on this server.  <ins>That\xe2\x80\x99s all we know.</ins>\n'
    2022-12-29 03:43:05,324 botocore.utils DEBUG    Max number of attempts exceeded (1) when attempting to retrieve data from metadata service.
    2022-12-29 03:43:05,326 botocore.loaders DEBUG    Loading JSON file: /home/earthling/myEnv/lib/python3.8/site-packages/botocore/data/endpoints.json
    2022-12-29 03:43:05,339 botocore.loaders DEBUG    Loading JSON file: /home/earthling/myEnv/lib/python3.8/site-packages/botocore/data/sdk-default-configuration.json
    2022-12-29 03:43:05,340 botocore.hooks DEBUG    Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f3d608f5af0>
    2022-12-29 03:43:05,348 botocore.loaders DEBUG    Loading JSON file: /home/earthling/myEnv/lib/python3.8/site-packages/botocore/data/translate/2017-07-01/service-2.json
    2022-12-29 03:43:05,351 botocore.hooks DEBUG    Event creating-client-class.translate: calling handler <function add_generate_presigned_url at 0x7f3d6097a790>
    2022-12-29 03:43:05,352 botocore.endpoint DEBUG    Setting translate timeout as (60, 60)
    2022-12-29 03:43:05,353 botocore.loaders DEBUG    Loading JSON file: /home/earthling/myEnv/lib/python3.8/site-packages/botocore/data/_retry.json
    2022-12-29 03:43:05,354 botocore.client DEBUG    Registering retry handlers for service: translate
    2022-12-29 03:43:06,084 asyncio      DEBUG    Using selector: EpollSelector
    2022-12-29 03:43:06,801 botocore.hooks DEBUG    Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
    2022-12-29 03:43:06,803 botocore.hooks DEBUG    Changing event name from before-call.apigateway to before-call.api-gateway
    2022-12-29 03:43:06,804 botocore.hooks DEBUG    Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
    2022-12-29 03:43:06,805 botocore.hooks DEBUG    Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
    2022-12-29 03:43:06,805 botocore.hooks DEBUG    Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
    2022-12-29 03:43:06,806 botocore.hooks DEBUG    Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
    2022-12-29 03:43:06,807 botocore.hooks DEBUG    Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
    2022-12-29 03:43:06,809 botocore.hooks DEBUG    Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
    2022-12-29 03:43:06,809 botocore.hooks DEBUG    Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
    2022-12-29 03:43:06,809 botocore.hooks DEBUG    Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
    2022-12-29 03:43:06,810 botocore.hooks DEBUG    Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
    2022-12-29 03:43:06,814 botocore.utils DEBUG    IMDS ENDPOINT: http://169.254.169.254/
    2022-12-29 03:43:06,816 botocore.credentials DEBUG    Looking for credentials via: env
    2022-12-29 03:43:06,816 botocore.credentials DEBUG    Looking for credentials via: assume-role
    2022-12-29 03:43:06,816 botocore.credentials DEBUG    Looking for credentials via: assume-role-with-web-identity
    2022-12-29 03:43:06,816 botocore.credentials DEBUG    Looking for credentials via: sso
    2022-12-29 03:43:06,816 botocore.credentials DEBUG    Looking for credentials via: shared-credentials-file
    2022-12-29 03:43:06,816 botocore.credentials DEBUG    Looking for credentials via: custom-process
    2022-12-29 03:43:06,816 botocore.credentials DEBUG    Looking for credentials via: config-file
    2022-12-29 03:43:06,817 botocore.credentials DEBUG    Looking for credentials via: ec2-credentials-file
    2022-12-29 03:43:06,817 botocore.credentials DEBUG    Looking for credentials via: boto-config
    2022-12-29 03:43:06,817 botocore.credentials DEBUG    Looking for credentials via: container-role
    2022-12-29 03:43:06,817 botocore.credentials DEBUG    Looking for credentials via: iam-role
    2022-12-29 03:43:06,818 urllib3.connectionpool DEBUG    Starting new HTTP connection (1): 169.254.169.254:80
    2022-12-29 03:43:06,822 urllib3.connectionpool DEBUG    http://169.254.169.254:80 "PUT /latest/api/token HTTP/1.1" 405 1604
    2022-12-29 03:43:06,824 urllib3.connectionpool DEBUG    http://169.254.169.254:80 "GET /latest/meta-data/iam/security-credentials/ HTTP/1.1" 404 1603
    2022-12-29 03:43:06,825 botocore.utils DEBUG    Metadata service returned non-200 response with status code of 404 for url: http://169.254.169.254/latest/meta-data/iam/security-credentials/, content body: b'<!DOCTYPE html>\n<html lang=en>\n  <meta charset=utf-8>\n  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\n  <title>Error 404 (Not Found)!!1</title>\n  <style>\n    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}\n  </style>\n  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\n  <p><b>404.</b> <ins>That\xe2\x80\x99s an error.</ins>\n  <p>The requested URL <code>/latest/meta-data/iam/security-credentials/</code> was not found on this server.  <ins>That\xe2\x80\x99s all we know.</ins>\n'
    2022-12-29 03:43:06,825 botocore.utils DEBUG    Max number of attempts exceeded (1) when attempting to retrieve data from metadata service.
    2022-12-29 03:43:06,828 botocore.loaders DEBUG    Loading JSON file: /home/earthling/myEnv/lib/python3.8/site-packages/botocore/data/endpoints.json
    2022-12-29 03:43:06,850 botocore.loaders DEBUG    Loading JSON file: /home/earthling/myEnv/lib/python3.8/site-packages/botocore/data/sdk-default-configuration.json
    2022-12-29 03:43:06,850 botocore.hooks DEBUG    Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f466eb08af0>
    2022-12-29 03:43:06,859 botocore.loaders DEBUG    Loading JSON file: /home/earthling/myEnv/lib/python3.8/site-packages/botocore/data/translate/2017-07-01/service-2.json
    2022-12-29 03:43:06,862 botocore.hooks DEBUG    Event creating-client-class.translate: calling handler <function add_generate_presigned_url at 0x7f466eb8c790>
    2022-12-29 03:43:06,864 botocore.endpoint DEBUG    Setting translate timeout as (60, 60)
    2022-12-29 03:43:06,865 botocore.loaders DEBUG    Loading JSON file: /home/earthling/myEnv/lib/python3.8/site-packages/botocore/data/_retry.json
    2022-12-29 03:43:06,866 botocore.client DEBUG    Registering retry handlers for service: translate
    2022-12-29 03:43:07,054 django.utils.autoreload INFO     Watching for file changes with StatReloader
    2022-12-29 03:43:07,055 django.utils.autoreload DEBUG    Waiting for apps ready_event.
    Exception in thread django-main-thread:
    Traceback (most recent call last):
      File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
        self.run()
      File "/usr/lib/python3.8/threading.py", line 870, in run
        self._target(*self._args, **self._kwargs)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
        fn(*args, **kwargs)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
        autoreload.raise_last_exception()
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
        raise _exception[1]
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
        autoreload.check_errors(django.setup)()
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
        fn(*args, **kwargs)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
        apps.populate(settings.INSTALLED_APPS)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
        app_config.import_models()
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
        self.models_module = import_module(models_module_name)
      File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
      File "<frozen importlib._bootstrap>", line 991, in _find_and_load
      File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 848, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/contrib/auth/models.py", line 92, in <module>
        class Group(models.Model):
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/db/models/base.py", line 161, in __new__
        new_class.add_to_class(obj_name, obj)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
        value.contribute_to_class(cls, name)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/db/models/fields/related.py", line 1635, in contribute_to_class
        self.remote_field.through = create_many_to_many_intermediary_model(self, cls)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/db/models/fields/related.py", line 1099, in create_many_to_many_intermediary_model
        'verbose_name': _('%(from)s-%(to)s relationship') % {'from': from_, 'to': to},
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/functional.py", line 176, in __mod__
        return str(self) % rhs
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/functional.py", line 140, in __text_cast
        return func(*self.__args, **self.__kw)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/translation/__init__.py", line 94, in gettext
        return _trans.gettext(message)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/translation/trans_real.py", line 355, in gettext
        _default = _default or translation(settings.LANGUAGE_CODE)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/translation/trans_real.py", line 268, in translation
        _translations[language] = DjangoTranslation(language)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/translation/trans_real.py", line 155, in __init__
        self._add_installed_apps_translations()
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/translation/trans_real.py", line 203, in _add_installed_apps_translations
        translation = self._new_gnu_trans(localedir)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/translation/trans_real.py", line 177, in _new_gnu_trans
        return gettext_module.translation(
      File "/usr/lib/python3.8/gettext.py", line 613, in translation
        t = _translations.setdefault(key, class_(fp))
      File "/usr/lib/python3.8/gettext.py", line 261, in __init__
        self._parse(fp)
      File "/usr/lib/python3.8/gettext.py", line 436, in _parse
        plural = v[1].split('plural=')[1]
    IndexError: list index out of range
    2022-12-29 03:43:07,155 django.utils.autoreload DEBUG    Main Django thread has terminated before apps are ready.
    2022-12-29 03:43:07,301 django.utils.autoreload DEBUG    Apps ready_event triggered. Sending autoreload_started signal.
    2022-12-29 03:43:07,309 asyncio      DEBUG    Using selector: EpollSelector
    Traceback (most recent call last):
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/apps/registry.py", line 156, in get_app_config
        return self.app_configs[app_label]
    KeyError: 'search'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/home/earthling/my-api/myapp_commerce/src/commerce/core/loading.py", line 190, in _find_registered_app_name
        app_config = apps.get_app_config(app_label)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/apps/registry.py", line 163, in get_app_config
        raise LookupError(message)
    LookupError: No installed app with label 'search'.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "manage.py", line 25, in <module>
        execute_from_command_line(sys.argv)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
        utility.execute()
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
        self.execute(*args, **cmd_options)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 61, in execute
        super().execute(*args, **options)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
        output = self.handle(*args, **options)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 96, in handle
        self.run(**options)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 103, in run
        autoreload.run_with_reloader(self.inner_run, **options)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/autoreload.py", line 637, in run_with_reloader
        start_django(reloader, main_func, *args, **kwargs)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/autoreload.py", line 622, in start_django
        reloader.run(django_main_thread)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/autoreload.py", line 327, in run
        autoreload_started.send(sender=self)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 180, in send
        return [
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
        (receiver, receiver(signal=self, sender=sender, **named))
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/template/autoreload.py", line 41, in watch_for_template_changes
        for directory in get_template_directories():
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/template/autoreload.py", line 20, in get_template_directories
        for loader in backend.engine.template_loaders:
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
        res = instance.__dict__[self.name] = self.func(instance)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/template/engine.py", line 98, in template_loaders
        return self.get_template_loaders(self.loaders)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/template/engine.py", line 103, in get_template_loaders
        loader = self.find_template_loader(template_loader)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/template/engine.py", line 115, in find_template_loader
        loader_class = import_string(loader)
      File "/home/earthling/myEnv/lib/python3.8/site-packages/django/utils/module_loading.py", line 17, in import_string
        module = import_module(module_path)
      File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
      File "<frozen importlib._bootstrap>", line 991, in _find_and_load
      File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 848, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/earthling/my-api/myapp_commerce/src/commerce/apps/search/context_processors.py", line 3, in <module>
        SearchForm = get_class('search.forms', 'SearchForm')
      File "/home/earthling/my-api/myapp_commerce/src/commerce/core/loading.py", line 38, in get_class
        return get_classes(module_label, [classname], module_prefix)[0]
      File "/home/earthling/my-api/myapp_commerce/src/commerce/core/loading.py", line 48, in get_classes
        return class_loader(module_label, classnames, module_prefix)
      File "/home/earthling/my-api/myapp_commerce/src/commerce/core/loading.py", line 106, in default_class_loader
        commerce_module = _import_module(commerce_module_label, classnames)
      File "/home/earthling/my-api/myapp_commerce/src/commerce/core/loading.py", line 140, in _import_module
        return __import__(module_label, fromlist=classnames)
      File "/home/earthling/my-api/myapp_commerce/src/commerce/apps/search/forms.py", line 11, in <module>
        is_solr_supported = get_class('search.features', 'is_solr_supported')
      File "/home/earthling/my-api/myapp_commerce/src/commerce/core/loading.py", line 38, in get_class
        return get_classes(module_label, [classname], module_prefix)[0]
      File "/home/earthling/my-api/myapp_commerce/src/commerce/core/loading.py", line 48, in get_classes
        return class_loader(module_label, classnames, module_prefix)
      File "/home/earthling/my-api/myapp_commerce/src/commerce/core/loading.py", line 111, in default_class_loader
        app_name = _find_registered_app_name(module_label)
      File "/home/earthling/my-api/myapp_commerce/src/commerce/core/loading.py", line 192, in _find_registered_app_name
        raise AppNotFoundError(
    myapp_commerce.src.commerce.core.exceptions.AppNotFoundError: Couldn't find an app to import search.features from
    2022-12-29 03:43:07,738 asyncio      DEBUG    Using selector: EpollSelector
    (myEnv) earthling@myinstance-1:~/my-api$


My folder structure :
    my-api
    |-myapp
    |    - __init__.py
    |    - settings.py
    |    - urls.py
    |    - asgi.py
    |    - wsgi.py
    |- manage.py
    |- .docker
    |    |-commerce
    |      |-docker
    |      |-setup.py
    |- myapp_auth
    |- myapp_posts
    |- myapp_commerce
    |    |-src
    |      |-commerce
    |         |-apps
    |         |- __init__.py
    |         |- config.py
    |         |- defaults.py
    |         |-core
    |               |- loading.py
    |               |- context_processors.py
    |               |- application.py
    |            |- exceptions.py
    |      |-sandbox
    |         |- __init__.py
    |         |-manage.py
    |- static
    |- templates
    |- .env
    |- docker-compose.env
    |- docker.compose-full.yml

I checked INSTALLED_APPS and everything seems to be fine. The content inside  myapp_commerce.src.commerce.__init.py__ contains INSTALLED_APPS & contents of settings.py inside sandbox.settings.py, both of  which I have also copied and pasted it in inside my core settings.py file in my-api.my_app.settings.py.
The Apps are properly installed. With regards to the search app above it is for eg :

> 'myapp_commerce.src.commerce.apps.search.apps.SearchConfig', 'other
> apps',

This is how the app search is configured :

    __init__.py

    default_app_config = 'myapp_commerce.src.commerce.apps.search.apps.SearchConfig'




    myapp_commerce.src.commerce.apps.search.apps.py

    class SearchConfig(CommerceConfig):
        label = 'search'
        name = 'myapp_commerce.src.commerce.apps.search'
        verbose_name = _('Search')
        namespace = 'search'


I cant figure where i could be going wrong despite the app being installed with correct syntax. 
Reply all
Reply to author
Forward
0 new messages