Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新注册的TG,始终无法运行 #57

Open
alastone opened this issue Feb 27, 2022 · 11 comments
Open

新注册的TG,始终无法运行 #57

alastone opened this issue Feb 27, 2022 · 11 comments

Comments

@alastone
Copy link

2022-02-27 23:15:12,260-telethon.network.mtprotosender-ERROR=> [send] Request caused struct.error: 'I' format requires 0 <= number <= 4294967295: GetUsersRequest(id=[InputUser(user_id=5299254924, access_hash=0)])
2022-02-27 23:15:12,261-asyncio-ERROR=> [default_exception_handler] Task exception was never retrieved
future: <Task finished name='Task-9' coro=<new_ver() done, defined at /jd/jbot/main.py:21> exception=error("'I' format requires 0 <= number <= 4294967295")>
Traceback (most recent call last):
File "/jd/jbot/main.py", line 37, in new_ver
await jdbot.send_message(chat_id, f'机器人上新了\n{botlog}\n运行日志为log/bot/run.log\n\n\t{info}', link_preview=False)
File "/usr/lib/python3.8/site-packages/telethon/client/messages.py", line 767, in send_message
entity = await self.get_input_entity(entity)
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 440, in get_input_entity
users = await self(functions.users.GetUsersRequest([
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 30, in call
return await self._call(self._sender, request, ordered=ordered)
File "/usr/lib/python3.8/site-packages/telethon/client/users.py", line 58, in _call
future = sender.send(request, ordered=ordered)
File "/usr/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 176, in send
state = RequestState(request)
File "/usr/lib/python3.8/site-packages/telethon/network/requeststate.py", line 17, in init
self.data = bytes(request)
File "/usr/lib/python3.8/site-packages/telethon/tl/tlobject.py", line 194, in bytes
return self._bytes()
File "/usr/lib/python3.8/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/lib/python3.8/site-packages/telethon/tl/functions/users.py", line 72, in
b'\x15\xc4\xb5\x1c',struct.pack('<i', len(self.id)),b''.join(x._bytes() for x in self.id),
File "/usr/lib/python3.8/site-packages/telethon/tl/types/init.py", line 11564, in _bytes
struct.pack('<I', self.user_id),
struct.error: 'I' format requires 0 <= number <= 4294967295

@SuMaiKaDe
Copy link
Owner

@alastone 没有更新telethon

@alastone
Copy link
Author

好的 谢谢大佬,我试试

@alastone
Copy link
Author

@SuMaiKaDe 还是同样的错误

@alastone
Copy link
Author

@alastone 没有更新telethon

同样报错

@SuMaiKaDe
Copy link
Owner

@alastone 这个错误就是这个引起的 你看一下你的telethon的版本吧

@alastone
Copy link
Author

telethon

root@jd:/jd# python3 -c "import telethon; print(telethon.version)"
1.21.1
这个版本可以吗

@SuMaiKaDe
Copy link
Owner

@alastone 不行 1.24 至少

@alastone
Copy link
Author

@alastone 不行 1.24 至少

小白求一条升级命令

@alastone
Copy link
Author

@alastone 不行 1.24 至少

小白求一条升级命令

谢谢大佬的耐心解答,解决了

@windowlife
Copy link

docker exec -it qinglong bash -c "pip3 install --upgrade telethon"

@windowlife
Copy link

升级了telethon,还是报同一个错误

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants