@dp.message_handler(state=GetUserInfo.waiting_den, content_types=types.ContentTypes.TEXT)
async def process_waiting_date(message: types.Message, state: FSMContext):
den = message.text
await state.update_data({'den': den})
await message.reply("Імя")
await GetUserInfo.next()
@dp.message_handler(state=GetUserInfo.waiting_judge, content_types=types.ContentTypes.TEXT)
async def process_waiting_judge(message: types.Message, state: FSMContext):
with open('new_data.json', 'r', encoding='utf-8') as f:
file_content = f.read()
data1 = json.loads(file_content)
data = await state.get_data()
den = data.get('den')
judges = message.text
for i in data1:
if den in i['date']:
if judges.upper() in i['judges'].upper():
news5 = f"{i['case']}.\n\n" \
f"\n<b>{i['case_involved']}.</b>\n\n" \
f"\n<b>{i['date']} год.</b>\n\n" \
f"\n<b>{i['case_description']}</b>.\n\n"
await message.reply(news5)
await state.finish()
Не подскажете почему выдает ошибку на последней стадии?