await self.storage.update_data(chat=self.chat, user=self.user, data=data, **kwargs)
File "/home/radzih/Python/Telegram/Pa/env/lib/python3.9/site-packages/aiogram/contrib/fsm_storage/redis.py", line 477, in update_data
await self.set_data(chat=chat, user=user, data=temp_data)
File "/home/radzih/Python/Telegram/Pa/env/lib/python3.9/site-packages/aiogram/contrib/fsm_storage/redis.py", line 467, in set_data
await redis.set(key, json.dumps(data), ex=self._data_ttl)
File "/home/radzih/Python/Telegram/Pa/env/lib/python3.9/site-packages/aiogram/utils/json.py", line 62, in dumps
return json.dumps(data, ensure_ascii=False)
File "/usr/lib/python3.9/json/__init__.py", line 234, in dumps
return cls(
File "/usr/lib/python3.9/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.9/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.9/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Test is not JSON serializable
Это он ругается на то что я передаю тапл здесь?
await state.update_data(
test=(questions, types),
practice=0,
grammar=0)
что такое type Test?
https://stackoverflow.com/questions/3768895/how-to-make-a-class-json-serializable
Моделька джанго
Нописано
Обсуждают сегодня