Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- TypeError Traceback (most recent call last)
- <ipython-input-19-139ad3629b25> in <module>
- 121
- 122 with open(all_matches_index, "w") as file_handle:
- --> 123 json.dump(file_handle, {"matches": matches})
- 124
- 125 file_handle.close
- /usr/lib/python3.8/json/__init__.py in dump(obj, fp, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)
- 177 # could accelerate with writelines in some versions of Python, at
- 178 # a debuggability cost
- --> 179 for chunk in iterable:
- 180 fp.write(chunk)
- 181
- /usr/lib/python3.8/json/encoder.py in _iterencode(o, _current_indent_level)
- 436 raise ValueError("Circular reference detected")
- 437 markers[markerid] = o
- --> 438 o = _default(o)
- 439 yield from _iterencode(o, _current_indent_level)
- 440 if markers is not None:
- /usr/lib/python3.8/json/encoder.py in default(self, o)
- 177
- 178 """
- --> 179 raise TypeError(f'Object of type {o.__class__.__name__} '
- 180 f'is not JSON serializable')
- 181
- TypeError: Object of type TextIOWrapper is not JSON serializable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement