struct.error: 'i' format requires -2147483648 <= number <= 2147483647 #22
Answered
by
aahnik
Ravikumarsd
asked this question in
Q&A
-
2021-02-25 00:55:25,058 - telethon.network.mtprotosender - INFO - Connecting to 91.108.56.129:443/TcpFull...
2021-02-25 00:55:25,144 - telethon.network.mtprotosender - INFO - Connection to 91.108.56.129:443/TcpFull complete!
2021-02-25 00:55:25,432 - telethon.network.mtprotosender - ERROR - Request caused struct.error: 'i' format requires -2147483648 <= number <= 2147483647: GetUsersRequest(id=[InputUser(user_id=1001245027408, access_hash=0)])
2021-02-25 00:55:25,432 - telethon.network.mtprotosender - INFO - Disconnecting from 91.108.56.129:443/TcpFull...
2021-02-25 00:55:25,433 - telethon.network.mtprotosender - INFO - Disconnection from 91.108.56.129:443/TcpFull complete!
Traceback (most recent call last):
File "/Users/apple/trading/telegram-chat-forward/forwarder.py", line 78, in <module>
asyncio.run(forward_job())
File "/usr/local/Cellar/python@3.9/3.9.2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/Cellar/python@3.9/3.9.2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/apple/trading/telegram-chat-forward/forwarder.py", line 49, in forward_job
async for message in client.iter_messages(intify(from_chat), reverse=True, offset_id=offset):
File "/usr/local/lib/python3.9/site-packages/telethon/requestiter.py", line 58, in __anext__
if await self._init(**self.kwargs):
File "/usr/local/lib/python3.9/site-packages/telethon/client/messages.py", line 26, in _init
self.entity = await self.client.get_input_entity(entity)
File "/usr/local/lib/python3.9/site-packages/telethon/client/users.py", line 440, in get_input_entity
users = await self(functions.users.GetUsersRequest([
File "/usr/local/lib/python3.9/site-packages/telethon/client/users.py", line 30, in __call__
return await self._call(self._sender, request, ordered=ordered)
File "/usr/local/lib/python3.9/site-packages/telethon/client/users.py", line 58, in _call
future = sender.send(request, ordered=ordered)
File "/usr/local/lib/python3.9/site-packages/telethon/network/mtprotosender.py", line 174, in send
state = RequestState(request)
File "/usr/local/lib/python3.9/site-packages/telethon/network/requeststate.py", line 17, in __init__
self.data = bytes(request)
File "/usr/local/lib/python3.9/site-packages/telethon/tl/tlobject.py", line 194, in __bytes__
return self._bytes()
File "/usr/local/lib/python3.9/site-packages/telethon/tl/functions/users.py", line 72, in _bytes
b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(x._bytes() for x in self.id),
File "/usr/local/lib/python3.9/site-packages/telethon/tl/functions/users.py", line 72, in <genexpr>
b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(x._bytes() for x in self.id),
File "/usr/local/lib/python3.9/site-packages/telethon/tl/types/__init__.py", line 11133, in _bytes
struct.pack('<i', self.user_id),
struct.error: 'i' format requires -2147483648 <= number <= 2147483647 |
Beta Was this translation helpful? Give feedback.
Answered by
aahnik
Feb 25, 2021
Replies: 1 comment
-
You have most probably messed up your Also please read this: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
aahnik
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have most probably messed up your
config.ini
file. I think you have used wrong chat id. Please check again. Show me youconfig.ini
for more help.Also please read this: