python3 main.py
[04-Jan-23 10:09:06 - INFO] - bot - Bot DKiller (@CORECT_NAME_OF_bot) started!
Traceback (most recent call last):
File "main.py", line 3, in <module>
Bot().run()
File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/utilities/run.py", line 80, in run
run(self.start())
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/storage_local/dkiller_bot/bot.py", line 35, in start
self.USER, self.USER_ID = await User().start()
File "/storage_local/dkiller_bot/user.py", line 23, in start
await super().start()
File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/utilities/start.py", line 58, in start
is_authorized = await self.connect()
File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/auth/connect.py", line 40, in connect
await self.load_session()
File "/usr/local/lib/python3.8/dist-packages/pyrogram/client.py", line 596, in load_session
await self.storage.open()
File "/usr/local/lib/python3.8/dist-packages/pyrogram/storage/memory_storage.py", line 59, in open
dc_id, api_id, test_mode, auth_key, user_id, is_bot = struct.unpack(
struct.error: unpack requires a buffer of 271 bytes
class Config(object):
# Get a bot token from @botfather
TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN", "5...46:AAEE....RQ")
# Get from my.telegram.org
APP_ID = int(os.environ.get("APP_ID", "2....4"))
# Get from my.telegram.org
API_HASH = os.environ.get("API_HASH", "d....18b")
# Authorized users to use this bot
AUTH_USERS = set(int(x) for x in os.environ.get("AUTH_USERS", "5....5").split())
# session name
TG_USER_SESSION_NAME = os.environ.get("TG_USER_SESSION_NAME", "oxmohsen")
# tg user session string
TG_USER_SESSION_STRING = os.environ.get("TG_USER_SESSION_STRING", "1BJ....Ckk=")
I've redacted the actual values.
Do you have any ideeas what could be wrong?
I've created the bot from another user, not the one under which I'm running the APP ID and HASH, but it should not matter i think as long i have the Bot Token.
Thank you!