We are experimenting with using SCORM and noticed that we had the XBlock installed as it comes as part of the Tutor install (Awesome! ).
We are having some issues when uploading the Scorm Zip. The file does get uploaded but we get an error when saving with the error " Studio’s having trouble saving your work".
The error from the CMS pod is below and I am about to start having a proper look at why it isn’t working for us as I can’t see anything obvious straight away. Has anybody run into this issue before?
2020-12-09 16:40:40,884 INFO 472 [botocore.vendored.requests.packages.urllib3.connectionpool] [user None] connectionpool.py:735 - Starting new HTTPS connection (2): s3.eu-west-2.amazonaws.com
2020-12-09 16:40:42,333 ERROR 472 [root] [user None] signals.py:23 - Uncaught exception from None
Traceback (most recent call last):
File "/openedx/venv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/openedx/venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/openedx/venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/pyenv/versions/3.5.9/lib/python3.5/contextlib.py", line 30, in inner
return func(*args, **kwds)
File "/openedx/venv/lib/python3.5/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/openedx/edx-platform/cms/djangoapps/contentstore/views/component.py", line 478, in component_handler
resp = handler_descriptor.handle(handler, req, suffix)
File "/openedx/venv/lib/python3.5/site-packages/xblock/mixins.py", line 89, in handle
return self.runtime.handle(self, handler_name, request, suffix)
File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1453, in handle
return super(MetricsMixin, self).handle(block, handler_name, request, suffix=suffix)
File "/openedx/venv/lib/python3.5/site-packages/xblock/runtime.py", line 1063, in handle
results = handler(request, suffix)
File "/openedx/venv/lib/python3.5/site-packages/openedxscorm/scormxblock.py", line 217, in studio_submit
self.extract_package(package_file)
File "/openedx/venv/lib/python3.5/site-packages/openedxscorm/scormxblock.py", line 275, in extract_package
ContentFile(scorm_zipfile.read(zipinfo.filename)),
File "/openedx/venv/lib/python3.5/site-packages/django/core/files/storage.py", line 52, in save
return self._save(name, content)
File "/openedx/venv/lib/python3.5/site-packages/storages/backends/s3boto3.py", line 495, in _save
self._save_content(obj, content, parameters=parameters)
File "/openedx/venv/lib/python3.5/site-packages/storages/backends/s3boto3.py", line 510, in _save_content
obj.upload_fileobj(content, ExtraArgs=put_parameters)
File "/openedx/venv/lib/python3.5/site-packages/boto3/s3/inject.py", line 513, in object_upload_fileobj
ExtraArgs=ExtraArgs, Callback=Callback, Config=Config)
File "/openedx/venv/lib/python3.5/site-packages/boto3/s3/inject.py", line 431, in upload_fileobj
return future.result()
File "/openedx/venv/lib/python3.5/site-packages/s3transfer/futures.py", line 73, in result
return self._coordinator.result()
File "/openedx/venv/lib/python3.5/site-packages/s3transfer/futures.py", line 233, in result
raise self._exception
File "/openedx/venv/lib/python3.5/site-packages/s3transfer/tasks.py", line 126, in __call__
return self._execute_main(kwargs)
File "/openedx/venv/lib/python3.5/site-packages/s3transfer/tasks.py", line 150, in _execute_main
return_value = self._main(**kwargs)
File "/openedx/venv/lib/python3.5/site-packages/s3transfer/upload.py", line 692, in _main
client.put_object(Bucket=bucket, Key=key, Body=body, **extra_args)
File "/openedx/venv/lib/python3.5/site-packages/botocore/client.py", line 317, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/openedx/venv/lib/python3.5/site-packages/botocore/client.py", line 589, in _make_api_call
api_params, operation_model, context=request_context)
File "/openedx/venv/lib/python3.5/site-packages/botocore/client.py", line 644, in _convert_to_request_dict
api_params, operation_model)
File "/openedx/venv/lib/python3.5/site-packages/botocore/validate.py", line 291, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter ContentType, value: b'text/javascript', type: <class 'bytes'>, valid types: <class 'str'>