Object of type CommonError is not JSON serializable
- Gajim version: 1.7.3
- python-nbxmpp Version: 4.2.2
- Python version: 3.10.6
This traceback appears sometimes in the log, without visible effects:
2023-05-10 16:12:18 (E) nbxmpp.dispatcher | (server.tld) Handler exception:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/nbxmpp/dispatcher.py", line 475, in dispatch
handler['func'](self._client, stanza, properties)
File "/usr/lib/python3.10/site-packages/gajim/common/modules/muc.py", line 544, in _on_error_presence
app.storage.events.store(room, event)
File "/usr/lib/python3.10/site-packages/gajim/common/storage/events.py", line 112, in store
json.dumps(event_dict, cls=Encoder)))
File "/usr/lib64/python3.10/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/usr/lib64/python3.10/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib64/python3.10/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.10/site-packages/gajim/common/storage/base.py", line 127, in default
return json.JSONEncoder.default(self, o)
File "/usr/lib64/python3.10/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type CommonError is not JSON serializable
I don't remember seeing it before upgrading from 1.5.4, but could be a coincidence.