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]: 不论是反代还是正向代理都出错 #682

Closed
youyi0218 opened this issue Feb 9, 2024 · 4 comments
Closed

[Bug]: 不论是反代还是正向代理都出错 #682

youyi0218 opened this issue Feb 9, 2024 · 4 comments
Labels
bug? Bug或Bug修复相关

Comments

@youyi0218
Copy link

部署方式

手动部署

登录框架

go-cqhttp

系统环境

win10专业版 位于大陆

Python环境

3.10

QChatGPT版本

2.6.10

异常情况

在config.py中,无论是用反向代理(oneapi,腾讯云函数)还是正向代理(clash)都报错SyntaxError: invalid syntax

日志信息

oneapi

D:\Program\QChatGPT>python main.py
Traceback (most recent call last):
File "D:\Program\QChatGPT\main.py", line 57, in
from pkg.utils.log import init_runtime_log_file, reset_logging
File "D:\Program\QChatGPT\pkg\utils\log.py", line 6, in
from . import context
File "D:\Program\QChatGPT\pkg\utils\context.py", line 8, in
from ..qqbot import manager as qqbot_mgr
File "D:\Program\QChatGPT\pkg\qqbot\manager.py", line 12, in
from ..qqbot import process as processor
File "D:\Program\QChatGPT\pkg\qqbot\process.py", line 16, in
from ..qqbot import command, message
File "D:\Program\QChatGPT\pkg\qqbot\command.py", line 4, in
from ..qqbot.cmds import aamgr as cmdmgr
File "D:\Program\QChatGPT\pkg\qqbot\cmds\aamgr.py", line 7, in
import tips as tips_custom
File "D:\Program\QChatGPT\tips.py", line 1, in
import config
File "D:\Program\QChatGPT\config.py", line 73
"reverse_proxy": https://one.caifree.com/v1
^
SyntaxError: invalid syntax

clash

D:\Program\QChatGPT>python main.py
Traceback (most recent call last):
File "D:\Program\QChatGPT\main.py", line 57, in
from pkg.utils.log import init_runtime_log_file, reset_logging
File "D:\Program\QChatGPT\pkg\utils\log.py", line 6, in
from . import context
File "D:\Program\QChatGPT\pkg\utils\context.py", line 8, in
from ..qqbot import manager as qqbot_mgr
File "D:\Program\QChatGPT\pkg\qqbot\manager.py", line 12, in
from ..qqbot import process as processor
File "D:\Program\QChatGPT\pkg\qqbot\process.py", line 16, in
from ..qqbot import command, message
File "D:\Program\QChatGPT\pkg\qqbot\command.py", line 4, in
from ..qqbot.cmds import aamgr as cmdmgr
File "D:\Program\QChatGPT\pkg\qqbot\cmds\aamgr.py", line 7, in
import tips as tips_custom
File "D:\Program\QChatGPT\tips.py", line 1, in
import config
File "D:\Program\QChatGPT\config.py", line 72
"http_proxy": http://127.0.0.1:7890,
^
SyntaxError: invalid syntax
腾讯云函数
D:\Program\QChatGPT>python main.py
Traceback (most recent call last):
File "D:\Program\QChatGPT\main.py", line 57, in
from pkg.utils.log import init_runtime_log_file, reset_logging
File "D:\Program\QChatGPT\pkg\utils\log.py", line 6, in
from . import context
File "D:\Program\QChatGPT\pkg\utils\context.py", line 8, in
from ..qqbot import manager as qqbot_mgr
File "D:\Program\QChatGPT\pkg\qqbot\manager.py", line 12, in
from ..qqbot import process as processor
File "D:\Program\QChatGPT\pkg\qqbot\process.py", line 16, in
from ..qqbot import command, message
File "D:\Program\QChatGPT\pkg\qqbot\command.py", line 4, in
from ..qqbot.cmds import aamgr as cmdmgr
File "D:\Program\QChatGPT\pkg\qqbot\cmds\aamgr.py", line 7, in
import tips as tips_custom
File "D:\Program\QChatGPT\tips.py", line 1, in
import config
File "D:\Program\QChatGPT\config.py", line 73
"reverse_proxy": https://service-hgbpvnnu-1310799201.hk.tencentapigw.cn/v1
^
SyntaxError: invalid decimal literal

启用的插件

无插件

@youyi0218 youyi0218 added the bug? Bug或Bug修复相关 label Feb 9, 2024
@RockChinQ
Copy link
Owner

地址是字符串,需要用英文双引号包裹

@youyi0218
Copy link
Author

地址是字符串,需要用英文双引号包裹

正向和反向都需要双引号吗

@RockChinQ
Copy link
Owner

这跟你什么代理没关系,这是Python语法

@youyi0218
Copy link
Author

这跟你什么代理没关系,这是Python语法

懂了,加上双引号就跑起来了,谢谢大佬orz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Bug或Bug修复相关
Projects
None yet
Development

No branches or pull requests

2 participants