2025-03-30 23:18:56,895 - bot_core - INFO - Bot initialization completed
2025-03-30 23:18:56,898 - main - ERROR - Error starting application: unsupported callable
2025-03-30 23:18:56,898 - main - CRITICAL - Fatal error: unsupported callable
2025-03-30 23:18:57,037 - asyncio - ERROR - Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x78e86e14c0>
2025-03-30 23:18:57,042 - asyncio - ERROR - Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x78e8a77950>, 20594.69092657)]']
connector: <aiohttp.connector.TCPConnector object at 0x78e86e1280>
В чем проблема? Как исправить ошибку?
Looking at the error logs and the code you've shared, I can see there's an issue with your Telegram bot that analyzes groups to find users with NFT gifts. The error is occurring during initialization, specifically with an "unsupported callable" error and unclosed client sessions.
The main issue appears to be in the main.py file where there's a problem with how the application is being initialized. Let me provide a solution:
code
The key issues I've identified:
The fixes include:
MyClass which seems redundant and may be causing confusionAdditionally, make sure your bot_core.py properly initializes the Telethon manager before using it:
code
These changes should help resolve the initialization issues and prevent the unclosed client session errors.
Переключись со мной на русский и отправь мне полный код того что ты исправил
Конечно, переключаюсь на русский. Вот полный исправленный код для файла main.py: