Our group has huge issues importing data into Sahana Eden, even though we follow the prescribed templates religiously, using either .csv, .xls or .xlsx format. (The documentation is very unclear about the permitted file formats, and the patterns seem to shift: Sometimes, .csv import works, at other times it does not - on the same file! The same applies to .xls and .xlsx.)
Here is the output we get:
Traceback (most recent call last):
File "/home/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
File "applications/eden/compiled/controllers.hms.hospital.py", line 279, in <module>
File "/home/web2py/gluon/globals.py", line 412, in <lambda>
self._caller = lambda f: f()
File "applications/eden/compiled/controllers.hms.hospital.py", line 256, in hospital
File "applications/eden/compiled/models.00_utils.py", line 198, in s3_rest_controller
File "applications/eden/modules/s3/s3rest.py", line 615, in __call__
output = handler(self, **attr)
File "applications/eden/modules/s3/s3rest.py", line 1679, in __call__
output = self.apply_method(r, **attr)
File "applications/eden/modules/s3/s3import.py", line 283, in apply_method
output = self.generate_job(r, **attr)
File "applications/eden/modules/s3/s3import.py", line 416, in generate_job
commit_job = single_pass)
File "applications/eden/modules/s3/s3import.py", line 999, in _generate_import_job
**args)
File "applications/eden/modules/s3/s3resource.py", line 2484, in import_xml
extra_data=extra_data)
File "applications/eden/modules/s3/s3xml.py", line 2322, in xls2tree
on_demand=True)
File "/usr/local/lib/python2.7/dist-packages/xlrd/__init__.py", line 416, in open_workbook
ragged_rows=ragged_rows,
File "/usr/local/lib/python2.7/dist-packages/xlrd/xlsx.py", line 791, in open_workbook_2007_xml
x12sheet.process_stream(zflo, heading)
File "/usr/local/lib/python2.7/dist-packages/xlrd/xlsx.py", line 531, in own_process_stream
self.do_dimension(elem)
File "/usr/local/lib/python2.7/dist-packages/xlrd/xlsx.py", line 565, in do_dimension
rowx, colx = cell_name_to_rowx_colx(last_cell_ref)
File "/usr/local/lib/python2.7/dist-packages/xlrd/xlsx.py", line 89, in cell_name_to_rowx_colx
assert 0 <= colx < X12_MAX_COLS
AssertionError
In file: /home/web2py/applications/eden/compiled/controllers.hms.hospital.pyc
<code object <module> at 0x7f999dbb7730, file "applications/eden/compiled/controllers.hms.hospital.py", line 5>