Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while creating a new Django application #32387

Closed
Scorpion197 opened this issue Jun 6, 2023 · 2 comments
Closed

Error while creating a new Django application #32387

Scorpion197 opened this issue Jun 6, 2023 · 2 comments

Comments

@Scorpion197
Copy link

I'm trying to create a new Django application after cloning the repo and installing necessary requirement using the following command

./manage.py lms startapp CustomApp

But i got the following error:

Traceback (most recent call last):
  File "./manage.py", line 103, in <module>
    startup.run()
  File "/home/scorpion197/edx-platform/lms/startup.py", line 22, in run
    django.setup()
  File "/home/scorpion197/edx-platform/edxenv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/scorpion197/edx-platform/edxenv/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/home/scorpion197/edx-platform/edxenv/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/scorpion197/edx-platform/lms/djangoapps/bulk_email/models.py", line 22, in <module>
    from openedx.core.djangoapps.course_groups.cohorts import get_cohort_by_name
  File "/home/scorpion197/edx-platform/openedx/core/djangoapps/course_groups/cohorts.py", line 21, in <module>
    from lms.djangoapps.courseware import courses
  File "/home/scorpion197/edx-platform/lms/djangoapps/courseware/courses.py", line 52, in <module>
    from lms.djangoapps.courseware.block_render import get_block
  File "/home/scorpion197/edx-platform/lms/djangoapps/courseware/block_render.py", line 48, in <module>
    from xmodule.library_tools import LibraryToolsService
  File "/home/scorpion197/edx-platform/xmodule/library_tools.py", line 13, in <module>
    from openedx.core.djangoapps.content_libraries import api as library_api
  File "/home/scorpion197/edx-platform/openedx/core/djangoapps/content_libraries/api.py", line 78, in <module>
    from openedx.core.djangoapps.content_libraries import permissions
  File "/home/scorpion197/edx-platform/openedx/core/djangoapps/content_libraries/permissions.py", line 7, in <module>
    from openedx.core.djangoapps.content_libraries.models import ContentLibraryPermission
  File "/home/scorpion197/edx-platform/openedx/core/djangoapps/content_libraries/models.py", line 81, in <module>
    class ContentLibrary(models.Model):
  File "/home/scorpion197/edx-platform/edxenv/lib/python3.8/site-packages/django/db/models/base.py", line 113, in __new__
    raise RuntimeError(
RuntimeError: Model class openedx.core.djangoapps.content_libraries.models.ContentLibrary doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

@kiran1415
Copy link
Contributor

@Scorpion197 which release/branch are you using?

@kdmccormick
Copy link
Member

You need to have run pip install -e . first.

Please use https://discuss.openedx.org/ for help requests in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants