Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jayvdb opened this issue Feb 8, 2019 · 1 comment

Comments

@jayvdb
Copy link

jayvdb commented Feb 8, 2019

[    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
@jayvdb jayvdb changed the title Python 2: TypeError: <generator object to_records at 0x7f11c3f2efa0> is not JSON serializable test_full_html: TypeError: <generator object to_records at 0x7f11c3f2efa0> is not JSON serializable Feb 8, 2019
@jayvdb
Copy link
Author

jayvdb commented Feb 8, 2019

Also test_embed_html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant