kolofordjango / kolo

See everything happening in your running Django app. All without leaving VSCode
https://kolo.app
486 stars 14 forks source link

TypeError: Object of type UniqueSequence is not JSON serializable #41

Closed yml closed 1 year ago

yml commented 1 year ago
kolo-save_request_in_db:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.10/site-packages/kolo/profiler.py", line 233, in save_request_in_db
    self.db_path, self.trace_id, json.dumps(json_data), wal_mode
  File "/usr/local/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/local/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type UniqueSequence is not JSON serializable
wilhelmklopp commented 1 year ago

This is where the UniqueSequence comes from if I remember correctly https://github.com/django-cms/django-sekizai/blob/115a0920b9deef2b786e05b80bec5370c07ccafc/sekizai/data.py#L1-L28