Open AleksFimin opened 1 year ago
Same issue here Any updates on this?
@AleksFimin, у меня получилось победить эту ошибку.
После этого сессия создалась.
Python version: 3.8.2 Pip version: 22.3.1 Operation System: Windows 10 (10.0.19044)
Tdata:
Code:
from opentele.td import TDesktop from opentele.tl import TelegramClient from opentele.api import API, UseCurrentSession import asyncio async def main(): # Load TDesktop client from tdata folder tdataFolder = r"C:\Users\Alex\Downloads\15\79872317223\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=UseCurrentSession) # 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())
Error:
Traceback (most recent call last): File "test.py", line 63, in <module> asyncio.run(main()) File "C:\Program Files\Python38\lib\asyncio\runners.py", line 43, in run return loop.run_until_complete(main) File "C:\Program Files\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete return future.result() File "test.py", line 48, in main tdesk = TDesktop(tdataFolder) File "C:\Users\Alex\AppData\Roaming\Python\Python38\site-packages\opentele\td\tdesktop.py", line 141, in __init__ self.LoadTData() PS D:\Code\Python\TgTool> py test.py Traceback (most recent call last): File "test.py", line 25, in <module> asyncio.run(main()) File "C:\Program Files\Python38\lib\asyncio\runners.py", line 43, in run return loop.run_until_complete(main) File "C:\Program Files\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete return future.result() File "test.py", line 10, in main tdesk = TDesktop(tdataFolder) File "C:\Users\Alex\AppData\Roaming\Python\Python38\site-packages\opentele\td\tdesktop.py", line 141, in __init__ self.LoadTData() File "C:\Users\Alex\AppData\Roaming\Python\Python38\site-packages\opentele\td\tdesktop.py", line 216, in LoadTData raise e File "C:\Users\Alex\AppData\Roaming\Python\Python38\site-packages\opentele\td\tdesktop.py", line 203, in LoadTData self.__loadFromTData() File "C:\Users\Alex\AppData\Roaming\Python\Python38\site-packages\opentele\td\tdesktop.py", line 453, in __loadFromTData Expects(len(self.accounts) > 0, "No account has been loaded") File "C:\Users\Alex\AppData\Roaming\Python\Python38\site-packages\opentele\exception.py", line 326, in Expects raise exception File "C:\Users\Alex\AppData\Roaming\Python\Python38\site-packages\opentele\td\tdesktop.py", line 453, in __loadFromTData Expects(len(self.accounts) > 0, "No account has been loaded") opentele.exception.OpenTeleException: Unexpected Exception: No account has been loaded [ Called by BaseObject.TDesktop.__loadFromTData() ]
Вам удалось найти фикс без костылей?
Same. How fix it? I tried as described above, but it didn’t work. There is a solution?
@AleksFimin, у меня получилось победить эту ошибку.
- https://github.com/thedemons/opentele/pull/74/files - пишут, что fix решает проблему, но я не стал его использовать. Удалил opentele и заново установил.
- В каталоге Tdata удалил все каталоги кроме D877F783D5D3EF8C, файлы все оставил.
- Из каталога D877F783D5D3EF8C удалил все, кроме файлов configs и maps.
- Скачал последнюю версию tportable с офсайта, открыл аккаунт в ней, вышел из программы.
После этого сессия создалась.
did not help. Any other solutions?
@AleksFimin, у меня получилось победить эту ошибку.
- https://github.com/thedemons/opentele/pull/74/files - пишут, что fix решает проблему, но я не стал его использовать. Удалил opentele и заново установил.
- В каталоге Tdata удалил все каталоги кроме D877F783D5D3EF8C, файлы все оставил.
- Из каталога D877F783D5D3EF8C удалил все, кроме файлов configs и maps.
- Скачал последнюю версию tportable с офсайта, открыл аккаунт в ней, вышел из программы.
После этого сессия создалась.
Didn't help with new tdatas
as a temporary solution you can use the old version, I use tportable-x64.4.14.2, in it tdata is created exactly which is supported by the library
One reason may be that the teleopen is out of date. I have the last entry in my keycard for key type 25, which is probably 16 bytes long. If this entry is ignored, this error does not occur ;'-} BugReport: https://github.com/thedemons/opentele/issues/120
Hello everyone, today I found a solution to this error. It occurs due to the fact that we are creating tdata from a new version of the telegram client, and the last update of the opentele library was 2 years ago. SOLUTION We go to the official git opentele (link below) and download the latest version, released 7 months ago and run it locally. https://github.com/thedemons/opentele
Thank you all for your attention <3
Hello everyone, today I found a solution to this error. It occurs due to the fact that we are creating tdata from a new version of the telegram client, and the last update of the opentele library was 2 years ago. SOLUTION We go to the official git opentele (link below) and download the latest version, released 7 months ago and run it locally. https://github.com/thedemons/opentele
Thank you all for your attention <3
Works for me, great job bro!
Hello everyone, today I found a solution to this error. It occurs due to the fact that we are creating tdata from a new version of the telegram client, and the last update of the opentele library was 2 years ago. SOLUTION We go to the official git opentele (link below) and download the latest version, released 7 months ago and run it locally. https://github.com/thedemons/opentele Thank you all for your attention <3
Works for me, great job bro!
Hi Sam.. may i know which python version you use?
because i still got that error on Python 3.7, pip 24.0, on Windows 11..
Hello everyone, today I found a solution to this error. It occurs due to the fact that we are creating tdata from a new version of the telegram client, and the last update of the opentele library was 2 years ago. SOLUTION We go to the official git opentele (link below) and download the latest version, released 7 months ago and run it locally. https://github.com/thedemons/opentele Thank you all for your attention <3
Works for me, great job bro!
Hi Sam.. may i know which python version you use?
because i still got that error on Python 3.7, pip 24.0, on Windows 11..
I'm using Python 3.11. Have you copy the latest SCR files into C:\Program Files\Python\Lib\site-packages\opentele ? Good luck
Python version: 3.8.2 Pip version: 22.3.1 Operation System: Windows 10 (10.0.19044)
Tdata:
Code:
Error: