Problem opening XLSX file
Simple handling of numerous data file formats, even COBOL EBCDIC.
Brought to you by:
slott56
testing functionality by using demo/app.py
INFO:main:Mode: process
ERROR:root:Can't convert 'NoneType' object to str implicitly
File "app.py", line 415, in <module>
with stingray.workbook.open_workbook( input ) as source:
/stingray/workbook/init.py", line 330, in call
return XLSX_Workbook( name, file_object )
/stingray/workbook/xlsx.py", line 60, in init
self._prepare()
/stingray/workbook/xlsx.py", line 70, in _prepare
self._get_shared_strings()
e/stingray/workbook/xlsx.py", line 127, in _get_shared_strings
self.strings_dict[ count ]+= element.text
TypeError: Can't convert 'NoneType' object to str implicitly</module>
The demo/app.py isn't really designed to work with the .xlsx files. It doesn't use the sheet name to pick specific sheets.
This will show how the application works. It's focused on .CSV files where there are no sheets in the file.
This is a lack of clarity in the documentation. The demo/app.py doesn't work with .XLSX files as written.
This isn't an issue that is specific with the demo app. I simply attempted to use the demo app when it was failing for me at the same point. Converting the file to an XLS file and the code works where the XLSX file fails, using the code:
with stingray.workbook.open_workbook( args.datadictionary ) as data_dictionary:
dd_sheet= data_dictionary.sheet( 'Data Dictionary v8.9',
stingray.sheet.EmbeddedSchemaSheet,
loader_class= stingray.schema.loader.HeadingRowSchemaLoader )