Issue when running tutor dev runserver lms

Hope you guys are doing well. Today when trying to develop locally on Mac with tutor dev runserver cms the page loaded fine, but had an issue when I was being redirected to local.overhang.io:8000 for login, kept getting the message no data was sent.

So I decided to just stop cms and instead run lms only by using the command tutor dev runserver lms. I started getting the following message

Creating tutor_dev_lms_run ... done
Setting file permissions for user openedx...
File permissions set.
Watching for file changes with StatReloader
2021-01-18 23:58:06,927 INFO 15 [django.utils.autoreload] [user None] [ip None] autoreload.py:597 - Watching for file changes with StatReloader
Performing system checks...

Exception in thread django-main-thread:
Traceback (most recent call last):
  File "/opt/pyenv/versions/3.8.6/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/opt/pyenv/versions/3.8.6/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/django/utils/autoreload.py", line 54, in wrapper
    fn(*args, **kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run
    self.check(display_num_errors=True)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 387, in check
    all_issues = self._run_checks(
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 377, in _run_checks
    return checks.run_checks(**kwargs)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/checks/registry.py", line 72, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/openedx/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 399, in check
    for pattern in self.url_patterns:
  File "/openedx/venv/lib/python3.8/site-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/openedx/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 584, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/openedx/venv/lib/python3.8/site-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/openedx/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 577, in urlconf_module
    return import_module(self.urlconf_name)
  File "/opt/pyenv/versions/3.8.6/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 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/openedx/edx-platform/lms/urls.py", line 147, in <module>
    url(r'^api/toggles/', include('openedx.core.djangoapps.waffle_utils.urls')),
  File "/openedx/venv/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include
    urlconf_module = import_module(urlconf_module)
  File "/opt/pyenv/versions/3.8.6/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 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/openedx/edx-platform/openedx/core/djangoapps/waffle_utils/urls.py", line 4, in <module>
    from openedx.core.djangoapps.waffle_utils.views import ToggleStateView
  File "/openedx/edx-platform/openedx/core/djangoapps/waffle_utils/views.py", line 7, in <module>
    from edx_django_utils.monitoring.code_owner.utils import get_code_owner_from_module, is_code_owner_mappings_configured
ModuleNotFoundError: No module named 'edx_django_utils.monitoring.code_owner.utils'
^C2021-01-19 00:02:31,882 WARNING 1 [py.warnings] [user None] [ip None] warnings.py:109 - /opt/pyenv/versions/3.8.6/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 15 is still running
  _warn("subprocess %s is still running" % self.pid,

tutor local start command works as expected, could hit both lms and cms domains. Using the latest version of tutor.

Further info: using tag open-release/koa.1. Have installed all requirements using the command pip install --requirement requirements/edx/development.txt in lms container.

Hi @c3ho! Are you quite sure that you are running open-release/koa.1? The error occurs because the following import line is failing:

from edx_django_utils.monitoring.code_owner.utils import get_code_owner_from_module, is_code_owner_mappings_configured

But, as you can see, this line is different in Koa.1 and should not cause an error: https://github.com/edx/edx-platform/blob/134d68d0570b91995847dcf33f5c3ac2d5e0a354/openedx/core/djangoapps/waffle_utils/views.py#L7

Are you mounting a local repo from your host machine? If yes, I strongly suggest you double-check the version of your repo. Are you using automatic bind-mounts? This is a new feature that makes it very easy to test forks of edx-platform: https://docs.tutor.overhang.io/dev.html#bind-mount-from-the-volumes-directory I suggest you look into it.