Trying to export a course from a CMS management command results in failure. The file that the output mentions doesn’t exist does exist in Files & Uploads
. Any advice on what’s going wrong. The course content is all published out so we’re not in draft state.
ubuntu@hawthorn-app:/edx/app/edxapp/edx-platform$ sudo -u edxapp /edx/bin/python.edxapp ./manage.py cms --settings=aws export_olx course-v1:PHOTONICS+IPSL+DEVELOPMENT --output ~/course.tar.gz
2022-05-03 17:42:26,296 INFO 26758 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
2022-05-03 17:42:26,969 WARNING 26758 [py.warnings] __init__.py:1555 - /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pkg_resources/__init__.py:1145: DeprecationWarning: Use of .. or absolute path in a resource path is not allowed and will raise exceptions in a future release.
self, resource_name
Traceback (most recent call last):
File "./manage.py", line 121, in <module>
execute_from_command_line([sys.argv[0]] + django_args)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/management/commands/export_olx.py", line 60, in handle
export_course_to_tarfile(course_key, filename)
File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/management/commands/export_olx.py", line 78, in export_course_to_tarfile
course_dir = export_course_to_directory(course_key, tmp_dir)
File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/management/commands/export_olx.py", line 98, in export_course_to_directory
export_course_to_xml(store, None, course.id, root_dir, course_dir)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/xml_exporter.py", line 346, in export_course_to_xml
CourseExportManager(modulestore, contentstore, course_key, root_dir, course_dir).export()
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/xml_exporter.py", line 169, in export
courselike.add_xml_to_node(root)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 602, in add_xml_to_node
super(XmlParserMixin, self).add_xml_to_node(node) # pylint: disable=bad-super-call
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1114, in add_xml_to_node
xml_string = self.export_to_xml(self.runtime.export_fs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 591, in export_to_xml
super(XmlDescriptor, self).add_xml_to_node(node)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 454, in add_xml_to_node
xml_object = self.definition_to_xml(self.runtime.export_fs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/course_module.py", line 1103, in definition_to_xml
xml_object = super(CourseDescriptor, self).definition_to_xml(resource_fs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 674, in definition_to_xml
self.runtime.add_block_as_child_node(child, xml_object)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1520, in add_block_as_child_node
block.add_xml_to_node(child)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 602, in add_xml_to_node
super(XmlParserMixin, self).add_xml_to_node(node) # pylint: disable=bad-super-call
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1114, in add_xml_to_node
xml_string = self.export_to_xml(self.runtime.export_fs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 591, in export_to_xml
super(XmlDescriptor, self).add_xml_to_node(node)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 454, in add_xml_to_node
xml_object = self.definition_to_xml(self.runtime.export_fs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 674, in definition_to_xml
self.runtime.add_block_as_child_node(child, xml_object)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1520, in add_block_as_child_node
block.add_xml_to_node(child)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 602, in add_xml_to_node
super(XmlParserMixin, self).add_xml_to_node(node) # pylint: disable=bad-super-call
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1114, in add_xml_to_node
xml_string = self.export_to_xml(self.runtime.export_fs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 591, in export_to_xml
super(XmlDescriptor, self).add_xml_to_node(node)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 454, in add_xml_to_node
xml_object = self.definition_to_xml(self.runtime.export_fs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/seq_module.py", line 674, in definition_to_xml
self.runtime.add_block_as_child_node(child, xml_object)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1520, in add_block_as_child_node
block.add_xml_to_node(child)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 454, in add_xml_to_node
xml_object = self.definition_to_xml(self.runtime.export_fs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/vertical_block.py", line 160, in definition_to_xml
self.runtime.add_block_as_child_node(child, xml_object)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1520, in add_block_as_child_node
block.add_xml_to_node(child)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 602, in add_xml_to_node
super(XmlParserMixin, self).add_xml_to_node(node) # pylint: disable=bad-super-call
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 1114, in add_xml_to_node
xml_string = self.export_to_xml(self.runtime.export_fs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 591, in export_to_xml
super(XmlDescriptor, self).add_xml_to_node(node)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/xml_module.py", line 454, in add_xml_to_node
xml_object = self.definition_to_xml(self.runtime.export_fs)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/video_module/video_module.py", line 717, in definition_to_xml
course_id=unicode(self.runtime.course_id.for_branch(None))
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edxval/api.py", line 864, in export_to_xml
return create_transcripts_xml(video_id, video_el, resource_fs, static_dir)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edxval/api.py", line 924, in create_transcripts_xml
static_dir=combine(u'course', static_dir) # File system should not start from /draft directory.
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edxval/api.py", line 889, in create_transcript_file
create_file_in_fs(transcript_content, transcript_filename, resource_fs, static_dir)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/edxval/utils.py", line 198, in create_file_in_fs
with file_system.open(combine(static_dir, file_name), 'wb') as f:
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/fs/osfs.py", line 386, in open
**options
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/fs/error_tools.py", line 82, in __exit__
traceback
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/fs/osfs.py", line 386, in open
**options
fs.errors.ResourceNotFound: resource 'course/static/6451bc96-08fe-4e07-85a3-bcf360b5e48f-en.srt' not found