opentele
opentele copied to clipboard
RecursionError: maximum recursion depth exceeded in comparison
I get RecursionError: maximum recursion depth exceeded in comparison when i try to start many sessions using asyncio
This is my code:
It works for 8 iterations, and fails with RecursionError
Stacktrace:
What i'm doing wrong? Or it's bug? Works perfect with only one session
The same issue, everything was good with one account at tdata if more than get 'maximum recursion depth exceeded'
I have the same problem . With one tdata record. Apparently it depends on the specific tdata. Some are converted, others are not. I purchased 3 tdata accounts, when converting, each of them has the same problem, the accounts are working.
File "D:\Проекты python\TdataToTelethon\venv\lib\site-packages\opentele\td\tdesktop.py", line 666, in api account.api = value File "D:\Проекты python\TdataToTelethon\venv\lib\site-packages\opentele\td\account.py", line 679, in api self.owner.api = self.api File "D:\Проекты python\TdataToTelethon\venv\lib\site-packages\opentele\td\tdesktop.py", line 666, in api account.api = value File "D:\Проекты python\TdataToTelethon\venv\lib\site-packages\opentele\td\account.py", line 679, in api self.owner.api = self.api File "D:\Проекты python\TdataToTelethon\venv\lib\site-packages\opentele\td\tdesktop.py", line 666, in api account.api = value File "D:\Проекты python\TdataToTelethon\venv\lib\site-packages\opentele\td\account.py", line 678, in api RecursionError: maximum recursion depth exceeded
Unfortunately, I couldn't replicate this bug, can you provide more information? This recursive error is weird, I don't understand how it could happen. Can you change the tdesktop.py line 666 From this:
account.api = value
To this:
if account.api != value:
account.api = value
And see what would happen?
Unfortunately, I couldn't replicate this bug, can you provide more information? This recursive error is weird, I don't understand how it could happen. Can you change the tdesktop.py line 666 From this:
account.api = value
To this:
if account.api != value: account.api = value
And see what would happen?
I tried it and nothing changed. P.S To reproduce the error try to convert tdata which contains at least 2 accounts or more, the error does not occur if the account is one
if account.api != value: account.api = value
tdesk = TDesktop("tdata", api=oldAPI)
File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\opentele\td\tdesktop.py", line 141, in init self.LoadTData() File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\opentele\td\tdesktop.py", line 203, in LoadTData self.__loadFromTData() File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\opentele\td\tdesktop.py", line 438, in __loadFromTData account = td.Account( File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\opentele\td\account.py", line 661, in init self.api = api.copy() File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\opentele\td\account.py", line 679, in api self.owner.api = self.api File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\opentele\td\tdesktop.py", line 667, in api
Here's the beginning of the recursion issue
Any updates?
in tdesktop.py, comment two lines
@api.setter
def api(self, value) -> None:
self.__api = value
# for account in self.accounts:
# account.api = value
The fix above works on the multi-account tdata and is selects one of the accounts