我在 edge.edx.org 上有一门课程,里面有一些视频,我导出了课程并想导入到我的 Open edX 实例(eucalyptus.1),但我会收到这个错误:
2017-11-21 04:47:42,307 ERROR 3995 [xmodule.vertical_block] vertical_block.py:122 - Unable to load child when parsing Vertical. Continuing...
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/vertical_block.py", line 119, in definition_from_xml
child_block = system.process_xml(etree.tostring(child, encoding='unicode'))
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/xml.py", line 196, in process_xml
id_manager,
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1595, in xblock_from_node
block = block_class.parse_xml(node, self, keys, id_generator)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 559, in parse_xml
return super(XmlParserMixin, cls).parse_xml(node, runtime, keys, id_generator) # pylint: disable=bad-super-call
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1074, in parse_xml
block = cls.from_xml(xml, runtime, id_generator)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/video_module/video_module.py", line 527, in from_xml
field_data = cls._parse_video_xml(xml_object, id_generator)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/video_module/video_module.py", line 788, in _parse_video_xml
course_id=course_id
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edxval/api.py", line 508, in import_from_xml
create_video(data)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edxval/api.py", line 104, in create_video
raise ValCannotCreateError(serializer.errors)
ValCannotCreateError: {'duration': [u'This field may not be null.'], 'edx_video_id': [u'This field may not be blank.'], 'client_video_id': [u'This field may not be null.']}
在检查导出的 XML 文件中视频块的内容后,我会看到该文件 (edx.edx.org) 与我在本地实例 (eucalyptus.1) 上创建和导出的视频课程之间的差异。来自 Edge 的视频的 XML 内容:
<video youtube="1.00:abc123123" url_name="123123123123" license="all-rights-reserved" display_name="TestVideo" download_track="true" download_video="false" edx_video_id="" html5_sources="[]" sub="abc123123" youtube_id_1_0="abc123123">
<video_asset/>
</video>
来自本地 (eucalyptus.1) 实例的视频:
<video youtube="1.00:abc123123" url_name="123123123123" license="all-rights-reserved" display_name="TestVideo" download_track="true" download_video="false" html5_sources="[]" sub="abc123123" youtube_id_1_0="abc123123"/>
我的问题是,是否可以将课程从较高版本的 edX 导入到较低版本(除了视频之外的所有内容实际上都正确导入),如果没有,是否有已知的解决方法?此外,如果错误表明这些字段可能不为空,为什么首先在导出时将它们设置为空?