【问题标题】:Telegram API (ModuleNotFoundError: No module named 'telethon.errors.rpc_errors_401')Telegram API(ModuleNotFoundError:没有名为“telethon.errors.rpc_errors_401”的模块)
【发布时间】:2020-08-07 18:25:01
【问题描述】:

我尝试通过 Jupyter Notebook 运行电报 API,但在导入时显示以下错误

从电视节目导入 TelegramClient ----> 2 from telethon.errors.rpc_errors_401 import SessionPasswordNeededError 3 4 # (1) 在这里使用你自己的值 5 api_id = 11111 ModuleNotFoundError:没有名为“telethon.errors.rpc_errors_401”的模块

【问题讨论】:

  • 你是如何安装telethon的,你的实际代码是什么?

标签: python api jupyter-notebook telegram telethon


【解决方案1】:

SessionPasswordNeededError 使用的模块是telethon.errors.rpcerrorlist。尝试使用from telethon.errors.rpcerrorlist import SessionPasswordNeededError

【讨论】:

    猜你喜欢
    • 2022-10-04
    • 2023-01-09
    • 2019-03-28
    • 2022-01-07
    • 2017-12-14
    • 2020-08-23
    • 2020-12-10
    • 2021-09-02
    相关资源
    最近更新 更多