Running Open edX via localhost

please help with my configuration settings. I follow this documentation:
https://edx.readthedocs.io/projects/open-edx-devstack/en/latest/pycharm_integration.html#setup-django-support

then I got this error after I run LMS and CMS:

docker-compose -f /home/drkmnd/devstack/docker-compose.yml -f /home/drkmnd/.cache/JetBrains/PyCharm2021.3/tmp/docker-compose.override.141.yml up --exit-code-from lms --abort-on-container-exit lms
WARNING: The DEVSTACK_WORKSPACE variable is not set. Defaulting to a blank string.
edx.devstack.mysql57 is up-to-date
edx.devstack.devpi is up-to-date
edx.devstack.elasticsearch710 is up-to-date
edx.devstack.memcached is up-to-date
edx.devstack.mongo is up-to-date
edx.devstack.discovery is up-to-date
edx.devstack.forum is up-to-date
Recreating edx.devstack.lms …
Attaching to edx.devstack.lms
edx.devstack.lms | Traceback (most recent call last):
edx.devstack.lms | File “/opt/project/edx-platform/manage.py”, line 20, in
edx.devstack.lms | from safe_lxml import defuse_xml_libs
edx.devstack.lms | ModuleNotFoundError: No module named ‘safe_lxml’
edx.devstack.lms exited with code 1
Aborting on container exit…
ERROR: 1

below are my Django Run/Debug Configuration Settings:

Host: blank
Additional options: 0.0.0.0:18000
custom run command: lms
Environment variables: PYTHONUNBUFFERED=1;DJANGO_SETTINGS_MODULE=lms.envs.devstack_docker;CONFIG_ROOT=/edx/app/edxapp;CMS_CFG=/edx/etc/lms.yml

Python Interpreter: Project Default (Remote Python 3.8.10 Docker Compose (lms at [/home/drkmnd/devstack/docker-compose.yml)]
Working directory: /edx/app/edxapp/edx-platform
path mappings: /home/drkmnd/edx-platform=/edx/app/edxapp/edx-platform

Below are my Before launch:
External tool > Name: stop all running containers for release
Program: make
Arguments: OPENEDX_RELEASE=juniper.master stop.all
Working directory: /home/drkmnd/devstack

deselect >Synchronize files after execution
select > open console for tool output
select > make console activate on message in stdout
select make > make console active on message in stderr

please help, I just want to customize both lms and cms and deploy via localhost

Not sure if this would be useful, but as it seems the error is realted to a missing module, may be you didn’t run make dev.provision or make dev.provision.lms ? The provisoin command is suppose to handle installing the requirments, hence the error is about a module not found.

[Edit]: Also may be make requirements would be suffient if you have ran the provision before. but make sure you are using or have activated the same pip env) you usually use for devstack.

Thank you for the reply. I am right now running make dev.provision but right now I have this error in the end:

Build failed: Unknown task: install_prereqs
make[1]: *** [Makefile:217: impl-dev.provision] Error 1
make[1]: Leaving directory ‘/home/drkmnd/devstack’
Would you like to assist devstack development by sending anonymous usage metrics to edX? Run make metrics-opt-in to learn more!
make: *** [Makefile:221: dev.provision] Error 2

venv is activated before I run command make dev.provision please help?

right now whenever I run make dev.provision I’m getting this error:

ERROR: for mysql57 Cannot start service mysql57: driver failed programming external connectivity on endpoint edx.devstack.mysql57 (6e2a7e3abaeefb5c1e457958d833b31ea753cc42b55e5e5b8b9dbddbad1ecb02): Error starting userland proxy: listen tcp [::]:3506: bind: address already in use
ERROR: Encountered errors while bringing up the project.
make[1]: *** [Makefile:225: impl-dev.provision.lms] Error 1
make[1]: Leaving directory ‘/home/drkmnd/devstack’
Would you like to assist devstack development by sending anonymous usage metrics to edX? Run make metrics-opt-in to learn more!
make: *** [Makefile:228: dev.provision.lms] Error 2

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.