Forums

Telegram Cannot Connect

hello im using pyrogram its show error

Unable to connect due to network issues: [Errno 111] Connect call failed ('149.154.167.51', 443)

That sounds like the library that you are using is trying to connect directly to Telegram. Free PythonAnywhere accounts have restricted Internet access, which goes via a proxy, and can only make outbound HTTP/HTTPS requests. From the error message, it looks like you're using a MTProto-based Telegram library, which does not use one of those protocols. You should use an HTTP/HTTPS-based one instead, and configure it to use the proxy -- the proxy details can be found by running this command in a Bash console:

echo $http_proxy