Telethon icon indicating copy to clipboard operation
Telethon copied to clipboard

Creating a new account implicitly fails on V2

Open penn5 opened this issue 2 years ago • 0 comments

Checklist

  • [x] The error is in the library's code, and not in my own.

Traceback

  File "/home/penn/biobot2/biobot/backends/userbot.py", line 47, in init
    await self.client.start(self.phone, code_callback=self.login_code and (lambda: self.login_code) or (lambda: input(f"Enter login the code you received on {self.phone}: ")))
  File "/home/penn/Telethon/telethon/_client/auth.py", line 23, in __aenter__
    await self.start_fn()
  File "/home/penn/Telethon/telethon/_client/auth.py", line 143, in _start
    me = await self.sign_in(phone, code=value)
  File "/home/penn/Telethon/telethon/_client/auth.py", line 254, in sign_in
    raise errors.PhoneNumberUnoccupiedError(request=request)
TypeError: RpcError.__init__() missing 2 required positional arguments: 'code' and 'message'

penn5 avatar Feb 27 '22 10:02 penn5