I have exported an IMSCC from Schoology (our LMS).
This LMS allows us to add links to websites
The attached image shows that the item "City pictures · Pexels · Free Stock Photos" is just a link to this website: https://www.pexels.com/search/city/
Your script falls over when it encounters such an error.
Here is the debug logs:
[2017-05-10 10:00:24,032] {convert_imscc_file.py:156} DEBUG - XML element obtained is:
City pictures · Pexels · Free Stock Photos
[2017-05-10 10:00:24,032] {convert_imscc_file.py:159} DEBUG - src_folder_identifier obtained is: ccres0000052
[2017-05-10 10:00:24,033] {convert_imscc_file.py:327} ERROR - Error converting imscc file: Home-Speaking-2.imscc
Traceback (most recent call last):
File "convert_imscc_file.py", line 316, in
process_xml_data(xml_data, imscc_zip_file_extracted_path, tmp_folder_for_structured_data_path)
File "convert_imscc_file.py", line 233, in process_xml_data
process_node(child_item_node, resources_data, src_dir_path, dst_dir_path)
File "convert_imscc_file.py", line 177, in process_node
process_node(each_item, resources_data, new_src_dir_path, new_dst_dir_path)
File "convert_imscc_file.py", line 177, in process_node
process_node(each_item, resources_data, new_src_dir_path, new_dst_dir_path)
File "convert_imscc_file.py", line 177, in process_node
process_node(each_item, resources_data, new_src_dir_path, new_dst_dir_path)
File "convert_imscc_file.py", line 163, in process_node
logger.debug("title node obtained is: {0}".format(xml_element.getElementsByTagName('title')[0].toprettyxml(indent = ' ')))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position 21: ordinal not in range(128)
[2017-05-10 10:00:24,033] {convert_imscc_file.py:51} DEBUG - Deleting directory /Users/ydo/Downloads/IMSCC/temp
[2017-05-10 10:00:24,033] {convert_imscc_file.py:331} INFO - Ending convert_imscc_to_zip script.
Thank you very much for your work on this.
If you want the entire archive I'm using your script to try to reconstruct, drop me an email (ayliffe.david@gmail.com)
I have exported an IMSCC from Schoology (our LMS). This LMS allows us to add links to websites The attached image shows that the item "City pictures · Pexels · Free Stock Photos" is just a link to this website: https://www.pexels.com/search/city/
Your script falls over when it encounters such an error.
Here is the debug logs:
[2017-05-10 10:00:24,032] {convert_imscc_file.py:156} DEBUG - XML element obtained is:
[2017-05-10 10:00:24,032] {convert_imscc_file.py:159} DEBUG - src_folder_identifier obtained is: ccres0000052 [2017-05-10 10:00:24,033] {convert_imscc_file.py:327} ERROR - Error converting imscc file: Home-Speaking-2.imscc Traceback (most recent call last): File "convert_imscc_file.py", line 316, in
process_xml_data(xml_data, imscc_zip_file_extracted_path, tmp_folder_for_structured_data_path)
File "convert_imscc_file.py", line 233, in process_xml_data
process_node(child_item_node, resources_data, src_dir_path, dst_dir_path)
File "convert_imscc_file.py", line 177, in process_node
process_node(each_item, resources_data, new_src_dir_path, new_dst_dir_path)
File "convert_imscc_file.py", line 177, in process_node
process_node(each_item, resources_data, new_src_dir_path, new_dst_dir_path)
File "convert_imscc_file.py", line 177, in process_node
process_node(each_item, resources_data, new_src_dir_path, new_dst_dir_path)
File "convert_imscc_file.py", line 163, in process_node
logger.debug("title node obtained is: {0}".format(xml_element.getElementsByTagName('title')[0].toprettyxml(indent = ' ')))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position 21: ordinal not in range(128)
[2017-05-10 10:00:24,033] {convert_imscc_file.py:51} DEBUG - Deleting directory /Users/ydo/Downloads/IMSCC/temp
[2017-05-10 10:00:24,033] {convert_imscc_file.py:331} INFO - Ending convert_imscc_to_zip script.
Attached is the .xml file for the weblink (rename to .xml) ccres0000052.xml.txt
Thank you very much for your work on this. If you want the entire archive I'm using your script to try to reconstruct, drop me an email (ayliffe.david@gmail.com)