Skip to content
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

[Bug]: 启动main.py后无任何输出 #674

Closed
zxcvbnm-das opened this issue Feb 4, 2024 · 12 comments
Closed

[Bug]: 启动main.py后无任何输出 #674

zxcvbnm-das opened this issue Feb 4, 2024 · 12 comments
Labels
bug? Bug或Bug修复相关 m: 启动流程 启动/关闭流程 pd: 待复现 pending: 需要测试以复现的issue,若您遇到相同问题,请提供更多的有价值的信息

Comments

@zxcvbnm-das
Copy link

部署方式

手动部署

登录框架

Mirai

系统环境

Ubuntu 22.04 中国北京 腾讯云(采用了反向代理)

Python环境

Python3.10.12

QChatGPT版本

v2.6.10

异常情况

mirai运行正常,mirai-api-http和QChatGPT的配置没有问题
单纯就是运行python3 main.py之后就无反应,无一字输出

日志信息

Mirai那边已经login successful并且可以正常接收账号信息
QChatGPT的日志和输出始终为空

启用的插件

无额外插件

@zxcvbnm-das zxcvbnm-das added the bug? Bug或Bug修复相关 label Feb 4, 2024
@RockChinQ
Copy link
Owner

发个截图看看

@zxcvbnm-das
Copy link
Author

mirai的初始日志(一直到mirai start successful)

ubuntu@VM-24-15-ubuntu:~/mirai$ ./mcl
  14:41:46 [INFO] iTX Technologies Mirai Console Loader version 2.1.2-61c8bd8
  14:41:46 [INFO] Runtime: OpenJDK 64-Bit Server VM 17.0.10 (arch: 64)
  14:41:46 [INFO] https://github.com/iTXTech/mirai-console-loader
  14:41:46 [INFO] This program is licensed under GNU AGPL v3
  14:41:47 [INFO] Mirai Console Loader Announcement:
Mirai Console Loader 公告栏

如果在图片上传的时候遇到问题请与我们联系 (需要提供图片文件源本)
`- 如 Unsupported image type for ExternalResource *
`  considering use gif/png/bmp/jpg format.
`- Tracker: https://github.com/mamoe/mirai/issues/new/choose

常用资源整合
`- https://mirai.mamoe.net/topic/653

MCL 已推出 2.1.0,更好的支持 Mirai 2.11 的插件系统,建议更新。

  14:41:47 [INFO] Verifying "net.mamoe:mirai-console" v2.16.0
  14:41:47 [INFO] Verifying "net.mamoe:mirai-console-terminal" v2.16.0
  14:41:48 [INFO] Verifying "net.mamoe:mirai-core-all" v2.16.0
  14:41:48 [INFO] Verifying "org.itxtech:mcl-addon" v2.1.1
  14:41:48 [INFO] Verifying "net.mamoe:mirai-api-http" v2.9.1
2024-02-04 14:41:49 I/main: Starting mirai-console...
2024-02-04 14:41:49 I/main:

===================================[ Mirai console 2.16.0 ]===================================
 __       __ __                   __  ______                                      __
|  \     /  \  \                 |  \/      \                                    |  \
| ▓▓\   /  ▓▓\▓▓ ______   ______  \▓▓  ▓▓▓▓▓▓\ ______  _______   _______  ______ | ▓▓ ______
| ▓▓▓\ /  ▓▓▓  \/      \ |      \|  \ ▓▓   \▓▓/      \|       \ /       \/      \| ▓▓/      \
| ▓▓▓▓\  ▓▓▓▓ ▓▓  ▓▓▓▓▓▓\ \▓▓▓▓▓▓\ ▓▓ ▓▓     |  ▓▓▓▓▓▓\ ▓▓▓▓▓▓▓\  ▓▓▓▓▓▓▓  ▓▓▓▓▓▓\ ▓▓  ▓▓▓▓▓▓\
| ▓▓\▓▓ ▓▓ ▓▓ ▓▓ ▓▓   \▓▓/      ▓▓ ▓▓ ▓▓   __| ▓▓  | ▓▓ ▓▓  | ▓▓\▓▓    \| ▓▓  | ▓▓ ▓▓ ▓▓    ▓▓
| ▓▓ \▓▓▓| ▓▓ ▓▓ ▓▓     |  ▓▓▓▓▓▓▓ ▓▓ ▓▓__/  \ ▓▓__/ ▓▓ ▓▓  | ▓▓_\▓▓▓▓▓▓\ ▓▓__/ ▓▓ ▓▓ ▓▓▓▓▓▓▓▓
| ▓▓  \▓ | ▓▓ ▓▓ ▓▓      \▓▓    ▓▓ ▓▓\▓▓    ▓▓\▓▓    ▓▓ ▓▓  | ▓▓       ▓▓\▓▓    ▓▓ ▓▓\▓▓     \
 \▓▓      \▓▓\▓▓\▓▓       \▓▓▓▓▓▓▓\▓▓ \▓▓▓▓▓▓  \▓▓▓▓▓▓ \▓▓   \▓▓\▓▓▓▓▓▓▓  \▓▓▓▓▓▓ \▓▓ \▓▓▓▓▓▓▓


2024-02-04 14:41:49 I/main: Backend: version 2.16.0, built on 2023-10-20 06:28:10.
2024-02-04 14:41:49 I/main: Frontend Terminal: version 2.16.0, provided by Mamoe Technologies
2024-02-04 14:41:49 I/main: Welcome to visit https://mirai.mamoe.net/
2024-02-04 14:41:50 I/QSign: Loading QSign v1.2.1-beta-dev-d62ddce (unidbg-fetch-qsign vNull)
2024-02-04 14:41:50 I/QSign: 正在 Mirai 2.16.0 上运行
2024-02-04 14:41:50 I/QSign: 签名服务目录: /home/ubuntu/mirai/txlib/8.9.90
2024-02-04 14:41:50 I/QSign: FEBound sum = 7680
2024-02-04 14:41:50 I/QSign: 已成功读取签名服务配置
2024-02-04 14:41:50 I/QSign:   签名协议包名: com.tencent.mobileqq
2024-02-04 14:41:50 I/QSign:   签名服务版本: 8.9.90
2024-02-04 14:41:50 I/QSign:   签名服务QUA: V1_AND_SQ_8.9.90_4938_YYB_D
2024-02-04 14:41:50 I/QSign: =============================================
2024-02-04 14:41:50 I/QSign: 已加载 ANDROID_PHONE 协议变更: 8.9.90.13250 (2023年10月11日 17:10:35)
2024-02-04 14:41:50 I/QSign: 已加载 ANDROID_PAD 协议变更: 8.9.90.13250 (2023年10月11日 17:10:35)
2024-02-04 14:41:50 I/QSign: 支持签名服务的协议: ANDROID_PHONE, ANDROID_PAD
2024-02-04 14:41:50 I/QSignService: 已注册加密算法提供服务
2024-02-04 14:41:50 I/plugin: Successfully loaded plugin QSign v1.2.1-beta-dev-d62ddce
2024-02-04 14:41:51 I/plugin: Successfully loaded plugin mirai-api-http v2.9.1
2024-02-04 14:41:51 I/plugin: Successfully loaded plugin MCL Addon v2.1.1
2024-02-04 14:41:51 I/main: Prepared built-in commands: autoLogin, help, login, logout, permission, status, stop
2024-02-04 14:41:51 I/Mirai HTTP API: ********************************************************
2024-02-04 14:41:51 I/MahKtorAdapter[ws]: Autoreload is disabled because the development mode is off.
2024-02-04 14:41:51 I/MahKtorAdapter[ws]: Application started in 0.048 seconds.
2024-02-04 14:41:51 I/MahKtorAdapter[ws]: Responding at http://localhost:8000
2024-02-04 14:41:51 I/ws adapter: >>> [ws adapter] is listening at ws://localhost:8000
2024-02-04 14:41:51 I/Mirai HTTP API: Http api server is running with verifyKey: yirimirai
2024-02-04 14:41:51 I/Mirai HTTP API: adaptors: [ws]
2024-02-04 14:41:51 I/Mirai HTTP API: ********************************************************
2024-02-04 14:41:51 I/MCL Addon: iTXTech MCL Version: 2.1.2-61c8bd8
2024-02-04 14:41:51 W/MCL Addon: iTXTech Soyuz 未安装,Soyuz MCL Handler 特性已禁用
2024-02-04 14:41:51 I/main: 4 plugin(s) enabled.
2024-02-04 14:41:51 I/main: mirai-console started successfully.

mirai登录部分截取了最结尾一小段(qq号都隐藏了)

2024-02-04 14:46:39 I/stdout: JNIEnv->ReleaseStringUTFChars("wtlogin.exchange_emp") was called from RX@0x403aec3c[libfekit.so]0x3aec3c
2024-02-04 14:46:39 I/stdout: JNIEnv->SetObjectField(com.tencent.mobileqq.sign.QQSecuritySign$SignResult@6136e55f, sign [B => [B@2dc965da) was called from RX@0x4008ff54[libfekit.so]0x8ff54
2024-02-04 14:46:39 I/stdout: JNIEnv->ReleaseStringUTFChars("8.9.90") was called from RX@0x4009cb90[libfekit.so]0x9cb90
2024-02-04 14:46:39 I/stdout: JNIEnv->ReleaseStringUTFChars("wtlogin.exchange_emp") was called from RX@0x4009cbb0[libfekit.so]0x9cbb0
2024-02-04 14:46:39 I/stdout: JNIEnv->ReleaseStringUTFChars("***") was called from RX@0x400a2e20[libfekit.so]0xa2e20
2024-02-04 14:46:39 I/Bot.***: Saved account secrets to local cache for fast login.
2024-02-04 14:46:39 I/Bot.***: Login successful.
2024-02-04 14:46:41 V/Bot.***: Event: BotOnlineEvent(bot=Bot(***))
2024-02-04 14:46:41 I/Bot.***: Bot login successful.
***(***) Login successful

然后qchatgpt那边(有很多空行是因为我以为我ssh这边卡住了,结果发现是它没输出)

ubuntu@VM-24-15-ubuntu:~/QChatGPT-2.6.10$ python3 main.py





@RockChinQ
Copy link
Owner

估计是你python命令不太对吧,你试试看单独敲 python3 有没有反应。或者试试 python,总之你这估计是环境的问题,确认是用 3.9 以上python启动 main.py 就可以了。

@zxcvbnm-das
Copy link
Author

zxcvbnm-das commented Feb 4, 2024

不是不是,python命令是python2python3 --version执行后可以输出Python 3.10.12

@RockChinQ
Copy link
Owner

那你要不在 config.py 中开启调试模式,试试看有什么输出?

@zxcvbnm-das
Copy link
Author

……还是没输出,一个字都木有,就算我调成NOTSET也没有

@RockChinQ
Copy link
Owner

可能的原因

  • 你的主机太卡了
  • 你的python环境不正常(可能有软件包被修改了)
  • 网络不太行(不太可能)

排查办法

  • 换一台机器试试看
  • 更新python到3.10 或 3.11
  • 自己写个小脚本这样跑一下看看能不能启动

@zxcvbnm-das
Copy link
Author

  • 首先主机太卡了这一点肯定不是,在之前我是因为mirai-api-http没设置对,当时是有输出的,只不过到"账号已登陆"就没了,这个问题已修复
  • 然后我自己的程序也可以成功运行
  • 至于python环境不正常这一点……我刚刚安装了python3.11.2,运行python3 main.py还是输出一字没有
    ……

@RockChinQ RockChinQ added pd: 待复现 pending: 需要测试以复现的issue,若您遇到相同问题,请提供更多的有价值的信息 m: 启动流程 启动/关闭流程 labels Feb 4, 2024
@the-lazy-me
Copy link

写一个python脚本运行一下吧,内容如:
print("Hello,world")
保存为test.py
然后python3 test.py

@zxcvbnm-das
Copy link
Author

可以正常运行的,输出"Hello,world"正常,似乎只有运行main.py出问题没有输出,怪怪的

@the-lazy-me
Copy link

加群吧,891448839

@cnrenil
Copy link

cnrenil commented Feb 4, 2024

python -v main.py可以查看程序运行的详细流程

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Bug或Bug修复相关 m: 启动流程 启动/关闭流程 pd: 待复现 pending: 需要测试以复现的issue,若您遇到相同问题,请提供更多的有价值的信息
Projects
None yet
Development

No branches or pull requests

4 participants