kennethreitz/tablib — Issue #57: can't add a dataset to an empty Databook
Author: interactive-matter
Created: 2012-03-05 15:48:34+00:00
State: open

Hi,

I created (a subclass of) a Databook. The I create one and add Datasets:

document = ExcelDocument("test.xls") <- ExcelDocument is the subclass of Databook - don't ask why ;)
sheet = Dataset()
document.add_sheet(sheet)

but executing this leads to this error:

======================================================================
ERROR: testDocumentExport (TestJSONExport.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "...\TestJSONExport.py", line 21, in testDocumentExport
document.add_sheet(sheet)
File "...\Python25\Lib\site-packages\tablib\core.py", line 898, in add_sheet
self._datasets.append(dataset)
AttributeError: 'ExcelDocument' object has no attribute '_datasets'

Did I miss something?