Advertisement
SolebaySharp

Full Error - StackOverflow Question

Sep 4th, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.36 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. TypeError                                 Traceback (most recent call last)
  3. <ipython-input-19-139ad3629b25> in <module>
  4.     121
  5.     122         with open(all_matches_index, "w") as file_handle:
  6. --> 123             json.dump(file_handle, {"matches": matches})
  7.     124
  8.     125 file_handle.close
  9.  
  10. /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)
  11.     177     # could accelerate with writelines in some versions of Python, at
  12.     178     # a debuggability cost
  13. --> 179     for chunk in iterable:
  14.     180         fp.write(chunk)
  15.     181
  16.  
  17. /usr/lib/python3.8/json/encoder.py in _iterencode(o, _current_indent_level)
  18.     436                     raise ValueError("Circular reference detected")
  19.     437                 markers[markerid] = o
  20. --> 438             o = _default(o)
  21.     439             yield from _iterencode(o, _current_indent_level)
  22.     440             if markers is not None:
  23.  
  24. /usr/lib/python3.8/json/encoder.py in default(self, o)
  25.     177
  26.     178         """
  27. --> 179         raise TypeError(f'Object of type {o.__class__.__name__} '
  28.    180                         f'is not JSON serializable')
  29.    181
  30.  
  31. TypeError: Object of type TextIOWrapper is not JSON serializable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement