overhangio / tutor

The Docker-based Open edX distribution designed for peace of mind
https://docs.tutor.overhang.io/
GNU Affero General Public License v3.0
930 stars 444 forks source link

During import of a course exported from edx.org, videos are not re-created #78

Closed frohro closed 6 years ago

frohro commented 6 years ago

I imported a course here and on edunext, and the videos appear on edunext, but not here. I have been able to add them by hand, but that is a bit painful.

regisb commented 6 years ago

Maybe there's a custom xblock present on edunext that's not included in the base install of openedx-docker. Can you email me the course, or just a sample of the course?

regisb commented 6 years ago

Also, can you give me the complete log produced by the lms and lms_worker during import? If some xblocks are not recognized, there should be some error logs produced.

frohro commented 6 years ago

I'm sorry I got too busy with other things here, and now the logs are only back to October 5, but this occurred before that.

regisb commented 6 years ago

It would really help if you could send me a sample exported course, or even just a piece of the course. Otherwise I won't be able to reproduce and solve it.

frohro commented 6 years ago

Did you get the link to the course I emailed you? Rob

regisb commented 6 years ago

Hmmmm no I didn't. Did you send the email to the address listed on my profile? https://github.com/regisb

regisb commented 6 years ago

Managed to reproduce the issue. Importing fails for videos with the following stacktrace:

 Traceback (most recent call last):
   File "/openedx/edx-platform/common/lib/xmodule/xmodule/vertical_block.py", line 148, in definition_from_xml
     child_block = system.process_xml(etree.tostring(child, encoding='unicode'))
   File "/openedx/edx-platform/common/lib/xmodule/xmodule/modulestore/xml.py", line 196, in process_xml
     id_manager,
   File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1608, in xblock_from_node
     block = block_class.parse_xml(node, self, keys, id_generator)
   File "/openedx/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 569, in parse_xml
     return super(XmlParserMixin, cls).parse_xml(node, runtime, keys, id_generator)  # pylint: disable=bad-super-call
   File "/openedx/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1088, in parse_xml
     block = cls.from_xml(xml, runtime, id_generator)
   File "/openedx/edx-platform/common/lib/xmodule/xmodule/video_module/video_module.py", line 638, in from_xml
     getattr(id_generator, 'target_course_id', None)
   File "/openedx/edx-platform/common/lib/xmodule/xmodule/video_module/video_module.py", line 984, in import_video_info_into_val
     course_id=course_id
   File "/usr/local/lib/python2.7/dist-packages/edxval/api.py", line 1028, in import_from_xml
     edx_video_id = create_video(data)
   File "/usr/local/lib/python2.7/dist-packages/edxval/api.py", line 113, in create_video
     raise ValCannotCreateError(serializer.errors)
 ValCannotCreateError: {'duration': [u'This field may not be null.'], 'client_video_id': [u'This field may not be null.']}

However, import was successful (including for videos) on a Ginkgo platform. It is confirmed that eduNext was running Ginkgo as well, which explains why importing the course there was successful.

So the conclusion is that videos from older courses on edx.org are not compatible with Hawthorn :-/ This is a problem with upstream Open edX, so I'm closing this issue here for now.

regisb commented 6 years ago

A Jira ticket was opened upstream: https://openedx.atlassian.net/browse/CRI-131