Django Installed Apps Error after Quickstart on M1

Hello Everyone,

I am working on setting up my development environment on an M1 Macbook and have followed the following guide: Open edX Devstack Development with Apple Macbook M1 Silicon (ARM Architecture)

I am still using the Maple version and v13.3.1 of Tutor since we cannot make significant changes currently.

Therefore, I have built the images locally using my fork of maple.3 tag using the --build-arg argument.

I have also changed the MySQL image to MariaDB as suggested.

I can run tutor local quickstart without a problem, however, once I try to open it shows Internal Server Error and the logs for lms and cms show the following problem.

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.

I have only found one more person with this problem here, however, it does not seem like their problem is solved: Tutor in development, error 1 import imp - #3 by Leonn - Tutor - Overhang.IO

I would like to ask if anyone has any clues as to what might have gone wrong.

I would also like to add that the exact same configuration works on an Intel Macbook.

I don’t think the problem is related to M1/ARM nor to MariaDB; it seems like a python/django installation or configuration issue.

content_libraries is a Django app plugin, so this line in should result in it being “auto-detected” by the system, and automatically added to INSTALLED_APPS. Yet for some reason it’s not in INSTALLED_APPS. Is there more context to the logs so we can see at what point the error is occurring?

I would guess at some possibilities:

  • Perhaps edx-platform is not installed correctly into the python virtual environment. From an LMS shell, in the edx-platform directory, you can try running pip install -e . and then ./ lms shell to see if that resolves it.
  • Perhaps something is modifying INSTALLED_APPS and removing content_libraries. I am not sure what that would be.
  • I think the system should also generally work with content_libraries uninstalled, so I’m wondering what code is referencing the content_libraries app even though it appears to be uninstalled. Perhaps the full error message may provide more clues.
1 Like

Thank you Braden for the tips!

We will investigate these possibilities.

The first suggestion of running pip install -e . inside the LMS shell worked.

For anyone who meets this issue, the problem was simpler than that.

I bind volume a clean fork of our edx-platform to the containers instead of exporting the fork from the image, and working on the exported version of the fork.

This meant that none of the commands to build the assets, install the openedx app etc actually run on the edx-platform directory.