Skip to content

test_full_html: TypeError: <generator object to_records at 0x7f11c3f2efa0> is not JSON serializable #1

@jayvdb

Description

@jayvdb
[    8s] ======================================================================
[    8s] ERROR: test_gantt.test_full_html
[    8s] ----------------------------------------------------------------------
[    8s] Traceback (most recent call last):
[    8s]   File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
[    8s]     self.test(*self.arg)
[    8s]   File "/home/abuild/rpmbuild/BUILD/pyexcel-gantt-0.0.1/tests/test_gantt.py", line 11, in test_full_html
[    8s]     chart.render_sheet(sheet)
[    8s]   File "/home/abuild/rpmbuild/BUILD/pyexcel-gantt-0.0.1/pyexcel_gantt/gantt.py", line 21, in render_sheet
[    8s]     tasks=utils.dumps(sheet.get_records()),
[    8s]   File "/home/abuild/rpmbuild/BUILD/pyexcel-gantt-0.0.1/pyexcel_gantt/utils.py", line 56, in dumps
[    8s]     return json.dumps(data, cls=DateTimeEncoder)
[    8s]   File "/usr/lib64/python2.7/json/__init__.py", line 251, in dumps
[    8s]     sort_keys=sort_keys, **kw).encode(obj)
[    8s]   File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
[    8s]     chunks = self.iterencode(o, _one_shot=True)
[    8s]   File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
[    8s]     return _iterencode(o, 0)
[    8s]   File "/home/abuild/rpmbuild/BUILD/pyexcel-gantt-0.0.1/pyexcel_gantt/utils.py", line 52, in default
[    8s]     return json.JSONEncoder.default(self, obj)
[    8s]   File "/usr/lib64/python2.7/json/encoder.py", line 184, in default
[    8s]     raise TypeError(repr(o) + " is not JSON serializable")
[    8s] TypeError: <generator object to_records at 0x7f11c3f2efa0> is not JSON serializable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions