Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 03775ec

Browse files
author
Rebecca Graber
authored
docs: add make requirements suggestion to docs (#1027)
1 parent 1a84875 commit 03775ec

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docs/troubleshoot_general_tips.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,22 @@ Resources - File Sharing section of the Docker preferences. Using a symlink as
195195
the current directory and sharing the real directory (or vice-versa) may work
196196
erratically.
197197

198+
Missing module
199+
--------------
200+
201+
Occasionally, you'll get errors like 'Cannot import name Name from module xyz'. This usually happens because the code and the image are out of sync. To fix this, first make sure you have the latest images and the latest code. These instructions are written using the LMS as an example. Replace lms with studio, credentials, discovery, etc. as appropriate.
202+
203+
#. Run ``make dev.stop.lms`` from devstack
204+
#. To update your image, you can run ``make dev.pull.lms`` from devstack.
205+
#. To get the latest code, you can run ``git fetch && git pull`` from the head of the code repository. If you are working on a branch, you may need to rebase it onto the latest master or main.
206+
#. From devstack, run ``make dev.up.lms`` and ``make dev.logs.lms``
207+
#. If the import error is still there, run ``make dev.shell.lms`` and then, from within the service container, run ``make requirements``
208+
#. After doing this, it may Just Work or you may need to restart the service with ``make dev.restart-devserver.lms`` (run from devstack)
209+
210+
Missing tables/migrations/fields
211+
--------------------------------
212+
Another error you may get if the code and the image are out of sync is sql or Django ORM errors about missing tables or models not having a certain field. To fix this, make sure you have the latest images and latest code, similar to the steps for Missing Module. Once you have updated the image and code, run ``make dev.migrate.lms`` (or your other service) from devstack to apply the latest migrations. You shouldn't need to restart the webserver or container.
213+
214+
215+
198216
.. _Understanding Git Conceptually: https://www.sbf5.com/~cduan/technical/git/

0 commit comments

Comments
 (0)