Describe the bug
RecursionError: maximum recursion depth exceeded
To Reproduce
Steps to reproduce the behavior:
Run example
from opentele.td import TDesktop
from opentele.tl import TelegramClient
from opentele.api import API, UseCurrentSession, CreateNewSession
import asyncio
async def main():
# Load TDesktop client from tdata folder
tdataFolder = r"F:\Telegram Desktop\tdata"
tdesk = TDesktop(tdataFolder)
# Check if we have loaded any accounts
assert tdesk.isLoaded()
# flag=UseCurrentSession
#
# Convert TDesktop to Telethon using the current session.
client = await tdesk.ToTelethon(session="telethon.session", flag=CreateNewSession)
# Connect and print all logged-in sessions of this client.
# Telethon will save the session to telethon.session on creation.
await client.connect()
await client.PrintSessions()
asyncio.run(main())
Expected behavior
Loaded account and .session output
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 677, in api
self.owner.api = self.api
^^^^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\tdesktop.py", line 666, in api
account.api = value
^^^^^^^^^^^
File "c:\Users\SeB4ik\Desktop\checker\venv\Lib\site-packages\opentele\td\account.py", line 676, in api
if self.owner.api != self.api:
^^^^^^^^^^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded
bug