-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cant use proxies in telegram-python-bot [BUG] #4263
Comments
Hi.
Your provided traceback does not give reason to think that the proxy is not being used. Quite the contrary, the line File "D:\MaMaD\پیام رسان سیمرغ\messanger\.venv\Lib\site-packages\httpcore\_async\http_proxy.py", line 289, in handle_async_request
connect_response = await self._connection.handle_async_request( does look very much like the httpx library (which ptb uses for the networking stuff) is using your proxy. So far I only see a regular timeout exception. Please have a look at this wiki page for that |
Also you should use |
i used this but problem exist I don't think PTB uses the proxy I define at all because there is no difference in the error between when I use it and when I don't. code:
traceback:
|
i know where is my problem |
try manually setting a proxy and making a request first - https://www.python-httpx.org/advanced/proxies/
That's handled by httpx internally probably. I can't speak for that |
Steps to Reproduce
i use python telegram bot and in my country, telegram is filtered and no one can access.
i want to use proxy buy i always get timed out error ( i checked my http proxy and its work )
my code:
Expected behaviour
When the proxy is set, all connections must be made through the proxy
Actual behaviour
I receive an error that I put the full text of the error in the relevant section
Operating System
python 3.11.9
Version of Python, python-telegram-bot & dependencies
Relevant log output
Additional Context
No response
The text was updated successfully, but these errors were encountered: