TeamPGM / PagerMaid-Pyro

Advanced Multi-Featured Telegram UserBot by pyrogram.
GNU Affero General Public License v3.0
646 stars 81 forks source link

[Bug]: python3 -m pagermaid 執行錯誤 #30

Closed liups233 closed 2 years ago

liups233 commented 2 years ago

请确保您已阅读以上注意事项,并勾选下方的确认框。

PagerMaid 版本 (或 Commit Id)

9de5f56

运行环境

Debian 11 - 5.10.0-17-amd64

运行架构

AMD64

重现步骤

cd ~ && git clone https://github.com/TeamPGM/PagerMaid-Pyro.git pagermaid
sudo apt install neofetch libzbar-dev -y 
sudo mv ~/pagermaid /opt/ && cd /opt/pagermaid
sudo useradd pagermaid
sudo chown -R pagermaid:pagermaid /opt/pagermaid
sudo pip3 install -r /opt/pagermaid/requirements.txt
sudo -u pagermaid bash
cp config.gen.yml config.yml
<修改config.yml中的id hash>
python3 -m pagermaid # ----> 出錯

期望的结果是什么?

正確登入帳號

实际的结果是什么?

python3 -m pagermaid 執行錯誤

简单的复现代码/链接(可选)

No response

日志记录(可选)

pagermaid@Debian-ESXi:/opt/pagermaid$ python3 -m pagermaid
[Degrade] Reading alias file failed:[Errno 2] No such file or directory: 'data/alias.json'
INFO [2022-09-07 08:56:40] [pagermaid] 加载内置模块: account, avoid, backup, clock, help, message, mixpanel, plugin, prune, reload, sentry, status, sudo, system, update
INFO [2022-09-07 08:56:40] [pagermaid] 将平台检测为“linux”,进入PagerMaid的早期加载过程。
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/opt/pagermaid/pagermaid/__main__.py", line 46, in <module>
    bot.run(main())
  File "/usr/local/lib/python3.9/dist-packages/pyrogram/methods/utilities/run.py", line 77, in run
    run(coroutine)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/opt/pagermaid/pagermaid/__main__.py", line 19, in main
    await bot.start()
  File "/usr/local/lib/python3.9/dist-packages/pyrogram/methods/utilities/start.py", line 58, in start
    is_authorized = await self.connect()
  File "/usr/local/lib/python3.9/dist-packages/pyrogram/methods/auth/connect.py", line 40, in connect
    await self.load_session()
  File "/usr/local/lib/python3.9/dist-packages/pyrogram/client.py", line 584, in load_session
    await Auth(
  File "/usr/local/lib/python3.9/dist-packages/pyrogram/session/auth.py", line 261, in create
    self.connection.close()
  File "/usr/local/lib/python3.9/dist-packages/pyrogram/connection/connection.py", line 76, in close
    self.protocol.close()
AttributeError: 'NoneType' object has no attribute 'close'

补充说明(可选)

omg-xtao commented 2 years ago

尝试删除目录下 pagermaid.session 重新运行

liups233 commented 2 years ago

沒有成功,錯誤依舊

尝试删除目录下 pagermaid.session 重新运行

omg-xtao commented 2 years ago

无法连接至 TG 服务器,尝试更换服务器

liups233 commented 2 years ago

无法连接至 TG 服务器,尝试更换服务器

vps是香港的

Code-Dramatist commented 2 years ago

这个问题已解决