Вылазит вот такая ошибка
Traceback (most recent call last):
File "main.py", line 5, in <module>
import text as bottext
File "C:\Users\Toshiba\Desktop\FastShop\text.py", line 13, in <module>
kabinet = f'??????: {types.Message.from_user.first_name} \n\n??????:'
File "C:\Users\Toshiba\AppData\Local\Programs\Python\Python37\lib\site-package
s\aiogram\types\fields.py", line 69, in __get__
return self.get_value(instance)
File "C:\Users\Toshiba\AppData\Local\Programs\Python\Python37\lib\site-package
s\aiogram\types\fields.py", line 46, in get_value
return instance.values.get(self.alias, self.default)
AttributeError: 'NoneType' object has no attribute 'values'
Первый файл(main.py)
@dp.callback_query_handler(text='kabinet')
async def faq(callback: types.CallbackQuery):
photo = InputFile("media/kabinet.jpg")
text = bottext.kabinet
await bot.delete_message(chat_id=callback.from_user.id, message_id=callback.message.message_id)
await callback.message.answer_photo(photo=photo, caption=text, reply_markup=nav.kabinetMenu)
await callback.answer()
И второй файл text.py
from aiogram import types
kabinet = f'Клиент: {types.Message.from_user.first_name} \n\nБаланс:'