Skip to content

Instantly share code, notes, and snippets.

@aquada
Created March 3, 2021 07:22
Show Gist options
  • Save aquada/8b1bd0aa0e4e67c64584b2f93a4a6ae3 to your computer and use it in GitHub Desktop.
Save aquada/8b1bd0aa0e4e67c64584b2f93a4a6ae3 to your computer and use it in GitHub Desktop.
Python error
Traceback (most recent call last):
File "tg-recover.py", line 13, in <module>
client.start()
File "/home/dan/.local/lib/python3.8/site-packages/telethon/client/auth.py", line 133, in start
else self.loop.run_until_complete(coro)
File "/usr/lib64/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/dan/.local/lib/python3.8/site-packages/telethon/client/auth.py", line 189, in _start
await self.send_code_request(phone, force_sms=force_sms)
File "/home/dan/.local/lib/python3.8/site-packages/telethon/client/auth.py", line 514, in send_code_request
result = await self(functions.auth.SendCodeRequest(
File "/home/dan/.local/lib/python3.8/site-packages/telethon/client/users.py", line 30, in __call__
return await self._call(self._sender, request, ordered=ordered)
File "/home/dan/.local/lib/python3.8/site-packages/telethon/client/users.py", line 58, in _call
future = sender.send(request, ordered=ordered)
File "/home/dan/.local/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 176, in send
state = RequestState(request)
File "/home/dan/.local/lib/python3.8/site-packages/telethon/network/requeststate.py", line 17, in __init__
self.data = bytes(request)
File "/home/dan/.local/lib/python3.8/site-packages/telethon/tl/tlobject.py", line 194, in __bytes__
return self._bytes()
File "/home/dan/.local/lib/python3.8/site-packages/telethon/tl/functions/auth.py", line 488, in _bytes
self.serialize_bytes(self.api_hash),
File "/home/dan/.local/lib/python3.8/site-packages/telethon/tl/tlobject.py", line 112, in serialize_bytes
raise TypeError(
TypeError: bytes or str expected, not <class 'int'>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment