pyrogram / tgcrypto

Fast and Portable Cryptography Extension Library for Pyrogram

Home Page:https://pyrogram.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

my session file not update when i join to new channel or create a own channel

Alireza-Ghavabesh opened this issue · comments

963-ERROR-[400 PEER_ID_INVALID]: The id/access_hash combination is invalid
Traceback (most recent call last):
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/client.py", line 1688, in resolve_peer
return self.storage.get_peer_by_id(peer_id)
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/storage/sqlite_storage.py", line 108, in get_peer_by_id
raise KeyError("ID not found: {}".format(peer_id))
KeyError: 'ID not found: -1001334270831'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/client.py", line 1711, in resolve_peer
return self.storage.get_peer_by_phone_number(peer_id)
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/storage/sqlite_storage.py", line 133, in get_peer_by_phone_number
raise KeyError("Phone number not found: {}".format(phone_number))
KeyError: 'Phone number not found: -1001334270831'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/ext/dispatcher.py", line 205, in update_worker
handler.callback(self.client, *args)
File "/mnt/f/venv_u/Pars_projects/copy_boy/Cli_copy_bot/on_server2/cli_copy_bot.py", line 1251, in bbcpersian
parse_mode="markdown"
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/methods/messages/send_photo.py", line 158, in send_photo
peer=self.resolve_peer(chat_id),
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/client.py", line 1713, in resolve_peer
raise PeerIdInvalid
pyrogram.errors.exceptions.bad_request_400.PeerIdInvalid: [400 PEER_ID_INVALID]: The id/access_hash combination is invalid
963-ERROR-[400 MESSAGE_TOO_LONG]: The message text is over 4096 characters (caused by "messages.SendMessage")
Traceback (most recent call last):
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/ext/dispatcher.py", line 205, in update_worker
handler.callback(self.client, *args)
File "/mnt/f/venv_u/Pars_projects/copy_boy/Cli_copy_bot/on_server2/cli_copy_bot.py", line 1074, in Tasnimnews
app.send_message(chat_id=main_user,text=str(message))
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/methods/messages/send_message.py", line 131, in send_message
entities=entities
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/client.py", line 1410, in send
r = self.session.send(data, retries, timeout)
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/session/session.py", line 439, in send
return self._send(data, timeout=timeout)
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/session/session.py", line 426, in _send
RPCError.raise_it(result, type(data))
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/errors/rpc_error.py", line 84, in raise_it
is_unknown=False)
pyrogram.errors.exceptions.bad_request_400.MessageTooLong: [400 MESSAGE_TOO_LONG]: The message text is over 4096 characters (caused by "messages.SendMessage")
963-ERROR-[400 PEER_ID_INVALID]: The id/access_hash combination is invalid
Traceback (most recent call last):
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/client.py", line 1688, in resolve_peer
return self.storage.get_peer_by_id(peer_id)
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/storage/sqlite_storage.py", line 108, in get_peer_by_id
raise KeyError("ID not found: {}".format(peer_id))
KeyError: 'ID not found: -1001461237221'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/client.py", line 1711, in resolve_peer
return self.storage.get_peer_by_phone_number(peer_id)
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/storage/sqlite_storage.py", line 133, in get_peer_by_phone_number
raise KeyError("Phone number not found: {}".format(phone_number))
KeyError: 'Phone number not found: -1001461237221'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/ext/dispatcher.py", line 205, in update_worker
handler.callback(self.client, *args)
File "/mnt/f/venv_u/Pars_projects/copy_boy/Cli_copy_bot/on_server2/cli_copy_bot.py", line 729, in visamondial
file_ref=File_ref
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/methods/messages/send_photo.py", line 158, in send_photo
peer=self.resolve_peer(chat_id),
File "/home/u/.local/lib/python3.6/site-packages/pyrogram/client/client.py", line 1713, in resolve_peer
raise PeerIdInvalid
pyrogram.errors.exceptions.bad_request_400.PeerIdInvalid: [400 PEER_ID_INVALID]: The id/access_hash combination is invalid

what is best way to handle this problem...?
Please, I really need the answer to this question.