Hi tutor community!
Right now we are trying to setup a development environment for our developer to work on customizing openedx. Unfortunately we are running is now errors here and there.
Lets start with setting up the dev env:
- We did it following the docs
- We get the server running by running ‘tutor dev runserver lms’
- Now we want to mount our own local fork by overriding the docker-compose volumes using these docs
- We get the following error when running tutor dev runserver lms:
The lms service will be available at http://local.overhang.io:8000
docker-compose -f /home/leon/.local/share/tutor/env/local/docker-compose.yml -f /home/leon/.local/share/tutor/env/dev/docker-compose.yml -f /home/leon/.local/share/tutor/env/dev/docker-compose.override.yml --project-name tutor_dev run --rm --service-ports lms
Creating tutor_dev_lms_run ... done
Setting file permissions for user openedx...
File permissions set.
2021-11-22 15:45:41,785 WARNING 1 [py.warnings] [user None] [ip None] warnings.py:109 - /openedx/venv/lib/python3.8/site-packages/newrelic/core/application.py:26: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Traceback (most recent call last):
File "/openedx/edx-platform/openedx/core/djangoapps/coursegraph/tasks.py", line 19, in <module>
from py2neo.matching import NodeMatcher
ModuleNotFoundError: No module named 'py2neo.matching'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./manage.py", line 103, in <module>
startup.run()
File "/openedx/edx-platform/lms/startup.py", line 20, in run
django.setup()
File "/openedx/venv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/openedx/venv/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/openedx/venv/lib/python3.8/site-packages/django/apps/config.py", line 116, in create
mod = import_module(mod_path)
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/coursegraph/apps.py", line 11, in <module>
class CoursegraphConfig(AppConfig):
File "/openedx/edx-platform/openedx/core/djangoapps/coursegraph/apps.py", line 17, in CoursegraphConfig
from openedx.core.djangoapps.coursegraph import tasks
File "/openedx/edx-platform/openedx/core/djangoapps/coursegraph/tasks.py", line 21, in <module>
from py2neo import NodeMatcher
ImportError: cannot import name 'NodeMatcher' from 'py2neo' (/openedx/venv/src/py2neo/py2neo/__init__.py)
ERROR: 1
Error: Command failed with status 1: docker-compose -f /home/leon/.local/share/tutor/env/local/docker-compose.yml -f /home/leon/.local/share/tutor/env/dev/docker-compose.yml -f /home/leon/.local/share/tutor/env/dev/docker-compose.override.yml --project-name tutor_dev run --rm --service-ports lms
We have been searching for /openedx/venv/lib/python3.8/site-packes/nerelic/core/application.py to change the change import imp. Unfortunately we can’t find it, probably due to it being in an venv that is not remotely accessible(?).
The override yml:
version: "3.7"
services:
lms:
volumes:
- /home/leon/edxsource/edx-platform/:/openedx/edx-platform
cms:
volumes:
- /home/leon/edxsource/edx-platform/:/openedx/edx-platform
lms-worker:
volumes:
- /home/leon/edxsource/edx-platform/:/openedx/edx-platform
cms-worker:
volumes:
- /home/leon/edxsource/edx-platform/:/openedx/edx-platform
Hopefully you guys can give on some insights on this situation. Haven’t been able to find this error by searching the docs and this forum.
We did found this Tutor Analysis openedx.atlassian.net/wiki/spaces/AC/pages/2451276919/Tutor+Analysis
. Here they are talking about copying container’s venv to the host using the bindmount command. In our view this couldn’t be possible since the container doesn’t exist yet(?). I’m sure we are missing some conceptual vision in this matter. Hopefully you guys can help us a bit.
Thanks in advance!