Telethon
Telethon copied to clipboard
Error during sign_in() process
Using the last commit, during the process of sign_in:
xxx@Rafaels-MacBook-Pro-3 telegram % python3 test1.py
Please enter your phone (or bot token): +346xxxxxxxx
Please enter the code you received: xxxxxx
Traceback (most recent call last):
File "/Users/xxx/Documents/telegram/test1.py", line 56, in <module>
asyncio.run(main())
File "/usr/local/Cellar/[email protected]/3.9.6/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/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/xxx/Documents/telegram/test1.py", line 9, in main
async with TelegramClient('anon', api_id, api_hash).start() as client:
File "/usr/local/lib/python3.9/site-packages/telethon/_client/auth.py", line 25, in __aenter__
await self.start_fn()
File "/usr/local/lib/python3.9/site-packages/telethon/_client/auth.py", line 143, in _start
me = await self.sign_in(phone, code=value)
TypeError: sign_in() takes 1 positional argument but 2 positional arguments (and 1 keyword-only argument) were given
+1
I tried used previous version to login and create the session. Don't close the session, then you can keep doing with your new version codes. I think they are not doing any update and debug anymore.
Closing since v2 is not ready for public use yet and the error should not be occurring in the v1.25 version available from PyPi.