Closed igobranco closed 1 month ago
@Danyal-Faheem FYI
I'm seeing this error running latest tutor nightly:
2024-06-20 22:41:47,739 WARNING 7 [xblock.plugin] [user None] [ip None] plugin.py:144 - 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'
@pomegranited to fix that on our old Open edX version installation we have installed the package importlib-resources==6.4.0
on Tutor config's OPENEDX_EXTRA_PIP_REQUIREMENTS
; and double check if you are running it on python 3.8 instead of 3.11.
Hi @igobranco, thank you for reporting this issue and for providing a solution as well. We're looking into it now.
Hi @pomegranited, can you provide steps on how to reproduce this error as well as your specific tutor environment version? I have tried to launch a new instance of tutor 18.0.0-nightly and scorm seems to be working fine for me.
This issue is resolved in v18.0.1, which ships in the (updated) "openedx" Docker image. Please fetch the latest changes with tutor images pull openedx
.
(@pomegranited I believe your issue is unrelated. As far as I understand, you should simply update your nightly image.)
After upgrading to
18.0.0
we no longer view the old deploy SCORMs. We are using an on-premisses S3 compatible (Ceph) service and not the AWS service.The change of:
As inadvertently created this issue, from my analysis it seams because the
storage.exists(...)
isn't working as expected on our deployment. I don't know if it could affecting other deployments using AWS S3 service.From the Django documentation:
It's written in the docs a file and not a folder. It could work fine from local file storage, but at least on S3 Ceph isn't - storage class:
storages.backends.s3boto3.S3Boto3Storage
.Ref: https://docs.djangoproject.com/en/3.2/ref/files/storage/#django.core.files.storage.Storage.exists
Proposal change, that would fix our issue: