HiddenDescriptorWithMixins "no attribute" errors when upgrading to Olive

After upgrading our edx-platform fork to the Olive version, our test environment was no longer able to load the lms frontend application, reporting errors saying:

AttributeError: ‘HiddenDescriptorWithMixins’ object has no attribute ‘grading_policy’

Seeing that the error was related to grades I attempted running the compute_grades command in case missing data was the root cause. However, that also failed with the error:

AttributeError: ‘HiddenDescriptorWithMixins’ object has no attribute ‘id’

In the end, @dave helped me fix this error by repackaging edx-platform with

sudo python3 setup.py develop

In my understanding, this was necessary because packages that had previously been managed as submodules (such as xmodule) were folded into edx-platform’s setup.py configuration as part of the olive upgrade. The submodules disappeared and their xblocks were now declared as part of the edx-platform package, but the stale version of edx-platform being included image did not yet include those xblock definitions.

First building edx-platform and then building the openedx image with tutor images build openedx enabled the system to recognize the xblocks and thereby no longer fallback to the default HiddenDescriptor block structure.

2 Likes

I encountered a similar error with xmodule on a vanilla olive setup with. A mounted venv.
and solved it by overwriting my updated venv with the original one from oenedx image