"Done" state is broken
2020-03-26 07:39:00,840 Unexpected error during timer processing Object of type datetime is not JSON serializable
Traceback (most recent call last):
File "/auction/prozorro_sale/auction/chronograph.py", line 41, in chronograph_loop
auction.timer_tick()
File "/auction/prozorro_sale/auction/state_machine.py", line 103, in timer_tick
self._auction.set_state(self.next_state)
File "/auction/prozorro_sale/auction/state_machine.py", line 419, in set_state
state_new.onEnter()
File "/auction/prozorro_sale/auction/state_machine.py", line 295, in onEnter
resp = requests.patch(url, json=data)
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 149, in patch
return request('patch', url, data=data, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 516, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 449, in prepare_request
p.prepare(
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 317, in prepare
self.prepare_body(data, files, json)
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 467, in prepare_body
body = complexjson.dumps(json)
File "/usr/local/lib/python3.8/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/local/lib/python3.8/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python3.8/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/local/lib/python3.8/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type datetime is not JSON serializable
2020-03-26 07:39:00,862 Processed auction 5e7c5b60907813cf31a3e09c, time - 0.035654544830322266
Edited by Ghost User