Redwood and earlier installed (1).
Starting with the [py3.11 upgrade] we dropped (1) in favor of (2).
To maintain compatibility with both, we use a try-except.
Fixes the error on Tutor Nightly:
ModuleNotFoundError: No module named 'importlib_resources'
Can be reproduced by running any management command in tutor dev
Unable to load XBlock 'scorm'
Traceback (most recent call last):
File "/openedx/venv/lib/python3.11/site-packages/xblock/plugin.py", line 141, in load_classes
yield (class_.name, cls._load_class_entry_point(class_))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/openedx/venv/lib/python3.11/site-packages/xblock/plugin.py", line 70, in _load_class_entry_point
class_ = entry_point.load()
^^^^^^^^^^^^^^^^^^
File "/openedx/venv/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2496, in load
return self.resolve()
^^^^^^^^^^^^^^
File "/openedx/venv/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2502, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/openedx/venv/lib/python3.11/site-packages/openedxscorm/__init__.py", line 1, in <module>
from .scormxblock import ScormXBlock
File "/openedx/venv/lib/python3.11/site-packages/openedxscorm/scormxblock.py", line 18, in <module>
import importlib_resources
ModuleNotFoundError: No module named 'importlib_resources'
description
Redwood and earlier installed (1). Starting with the [py3.11 upgrade] we dropped (1) in favor of (2). To maintain compatibility with both, we use a try-except.
Fixes the error on Tutor Nightly: ModuleNotFoundError: No module named 'importlib_resources'
[py3.11 upgrade] https://github.com/openedx/edx-platform/pull/34788
notes
Bumps version, 18.0.1 -> 18.0.2
full stack trace
Can be reproduced by running any management command in
tutor dev