You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am going to connect Telegram using Telethon with a proxy in a .py file, but always get a error: ConnectionError: Connection to Telegram failed 5 time(s). When I used Jupyter notebook it works. Then I try to use Pyrogram with the same proxy, it can connect to Telegram !!! And my desktop Telegram work, too. So it is just Telethon get a error.
Actual behavior
Attempt 4 at connecting failed: ProxyConnectionError: Error connecting to HTTP proxy 127.0.0.1:7897: [WinError 10061]
Attempt 5 at connecting failed: ProxyConnectionError: Error connecting to HTTP proxy 127.0.0.1:7897: [WinError 10061]
Attempt 6 at connecting failed: ProxyConnectionError: Error connecting to HTTP proxy 127.0.0.1:7897: [WinError 10061]
Automatic reconnection failed 5 time(s)
Traceback
No response
Telethon version
1.37
Python version
3.11
Operating system (including distribution name and version)
Windows 11
Other details
No response
Checklist
The error is in the library's code, and not in my own.
I have searched for this issue before posting it and there isn't an open duplicate.
I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.
The text was updated successfully, but these errors were encountered:
Hi ,
Just install python_socks ,
I had the same issue. This library uses two libraries for connecting to a proxy. When python_socks is installed, it uses that, and everything works fine without any problems. However, when it uses the other library, socks, it faces issues, and the proxy isn't applied—it gets bypassed. I couldn’t figure out why this happens, as my knowledge isn’t deep enough to understand the code at that level.
Code that causes the issue
Expected behavior
I am going to connect Telegram using Telethon with a proxy in a
.py
file, but always get a error:ConnectionError: Connection to Telegram failed 5 time(s)
. When I used Jupyter notebook it works. Then I try to use Pyrogram with the same proxy, it can connect to Telegram !!! And my desktop Telegram work, too. So it is just Telethon get a error.Actual behavior
Traceback
No response
Telethon version
1.37
Python version
3.11
Operating system (including distribution name and version)
Windows 11
Other details
No response
Checklist
pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip
and triggered the bug in the latest version.The text was updated successfully, but these errors were encountered: