Cannot import data file

Bug #1035969 reported by Proberts042
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool
Fix Released
Low
Alan Elkner

Bug Description

When I attempt to import a file I immediately receive this page:

Server Error

An internal server error has occurred. This most likely means that you have found a bug in SchoolTool. Please report it on the issue tracker.
Exception

IndexError: list index out of range

Traceback

File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 132, in publish
  result = publication.callObject(request, obj)
File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 207, in callObject
  return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 107, in mapply
  return debug_call(obj, args)
Extra information: <schooltool.skin.flourish.zcml_content.FlourishMegaImporter_import.html object at 0x91d96d0>
File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 113, in debug_call
  return obj(*args)
File "/usr/lib/python2.7/dist-packages/schooltool/skin/flourish/page.py", line 77, in __call__
  self.update()
File "/usr/lib/python2.7/dist-packages/schooltool/export/importer.py", line 1393, in update
  return MegaImporter.update(self)
File "/usr/lib/python2.7/dist-packages/schooltool/export/importer.py", line 1365, in update
  imp.import_data(wb)
File "/usr/lib/python2.7/dist-packages/schooltool/export/importer.py", line 263, in import_data
  return self.process()
File "/usr/lib/python2.7/dist-packages/schooltool/export/importer.py", line 441, in process
  if sh.cell_value(rowx=row, colx=col) != '':
File "/usr/lib/pymodules/python2.7/xlrd/sheet.py", line 253, in cell_value
  return self._cell_values[rowx][colx]

Revision history for this message
Alan Elkner (aelkner) wrote :

Proberts042,

Please add the following information to this bug report:

1) Linux version
2) Schooltool version
3) the xls file you tried to import

Thanks,
Alan

Revision history for this message
Proberts042 (proberts42) wrote :

1) Ubuntu Server 12.04
2) version 2.1
3) the file was downloaded from books.schooltool.org and modified. I have attached a copy.

Revision history for this message
Alan Elkner (aelkner) wrote :

Thank you for the sample_data.xls file. I can see that you've blanked out many things from our sample_data.xls file and decided to see what would happen with empty data. It's a good thing because you found a bug in the handling of empty data in the Terms sheet when there is a Weekends label but no data. It will be fixed in the next release.

After fixing the bug, the importer does fail rightfully as a result of missing data in your file, but thanks for giving us the edge case that helped us find the bug.

Alan Elkner (aelkner)
Changed in schooltool:
status: New → Fix Committed
assignee: nobody → Alan Elkner (aelkner)
Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

So... what should Proberts do now? Not fiddle with the terms sheet and enter terms through the web interface?

Revision history for this message
Alan Elkner (aelkner) wrote :

Proberts just needs to fill the cells all over the spreadsheet with whatever is meaningful for the school in question. The sample data we supply has meaningful values for the Weekend which I would think would make sense for most schools, so I would suggest restoring that to what we had supplied there.

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

I would recommend just using the web interface and not touching the terms sheet at all.

Changed in schooltool:
milestone: none → 2.2.1
importance: Undecided → Low
Changed in schooltool:
status: Fix Committed → Fix Released
Revision history for this message
Proberts042 (proberts42) wrote :

I still don't have an understanding concerning how to load data into SchoolTool using an Excel or CSV file. I tried eliminating all of the blank fields and that did not work. Do I need to populate all of the fields in order to use this method? If that is the case, it is of little use to me. I wish to import the data incrementally rather than all at once. The web interface is awkward for a large amount of data.

Thanks for our help.

Proberts042

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

Hi Proberts042,

First off, I'd note that we have been working on improvements to the Excel importer which will be released in October. This may be too late for you right now, but it is definitely something we've been attending to.

Some of the sheets are complex and not really helpful except if you need to export and reimport data. The years, terms, and timetables fit into those categories. You're really better off using the web interface for these, especially since they don't involve a large amount of data.

Are you having trouble entering people? Or with another specific sheets?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.