简体   繁体   English

在 pythonanywhere 上运行 Telethon

[英]Running telethon on pythonanywhere

try to run a basic scripts that adds members to a telegram group over pythoneverywhere server.尝试运行一个基本脚本,通过 pythoneverywhere 服务器将成员添加到电报组。 I installed the main package which is telethon in the server.我在服务器中安装了主要的 package,它是电视节目。 but i am getting the error in the image below.但我在下图中得到了错误。 what am i not doing right?我做错了什么? error message is given below错误信息如下

21:02 ~/Villians TV/Villians5/TeleGram-Scraper-master $ python3 villians5.py

Traceback (most recent call last):
  File "villians5.py", line 17, in <module>
    client.connect()
  File "/home/somti13/.local/lib/python3.8/site-packages/telethon/sync.py", line 39, in syncified
    return loop.run_until_complete(coro)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
    return future.result()
  File "/home/somti13/.local/lib/python3.8/site-packages/telethon/client/telegrambaseclient.py", line 472, in connect
    if not await self._sender.connect(self._connection(
  File "/home/somti13/.local/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 125, in connect
    await self._connect()
  File "/home/somti13/.local/lib/python3.8/site-packages/telethon/network/mtprotosender.py", line 250, in _connect
    raise ConnectionError('Connection to Telegram failed {} time(s)'.format(self._retries))
ConnectionError: Connection to Telegram failed 5 time(s)

The mtproto connection type for telegram does not work for free accounts on PythonAnywhere.电报的 mtproto 连接类型不适用于 PythonAnywhere 上的免费帐户。 Only http(s) connections out of PythonAnywhere will work for free accounts.只有 PythonAnywhere 之外的 http(s) 连接适用于免费帐户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM