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

drag_sensitive 函数报错 #2094

Closed
2 tasks done
manjieqi opened this issue Jun 20, 2024 · 3 comments
Closed
2 tasks done

drag_sensitive 函数报错 #2094

manjieqi opened this issue Jun 20, 2024 · 3 comments

Comments

@manjieqi
Copy link

前置确认

  • 我确认我运行的是最新版本的代码,并且安装了所需的依赖,在FAQS中也未找到类似问题。

⚠️ 搜索issues中是否已存在类似问题

  • 我已经搜索过issues和disscussions,没有跟我遇到的问题相关的issue

操作系统类型?

Docker

运行的python版本是?

python 3.7

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wechatmp(公众号, 订阅号)

复现步骤 🕹

[ERROR][2024-06-20 17:09:51][config.py:257] - can only concatenate list (not "str") to list
Traceback (most recent call last):
File "/app/config.py", line 254, in drag_sensitive
config_copy[key] = config_copy[key][0:3] + "*" * 5 + config_copy[key][-3:]
TypeError: can only concatenate list (not "str") to list

启动报上面的错误
配置文件是这么写的

environment:
TZ: 'Asia/Shanghai'
USE_GLOBAL_PLUGIN_CONFIG: True
# OpenAI配置
OPEN_AI_API_KEY: 'sk-xxxxxxxx'

问题描述 😯

应该是没考虑到KEY的值是一个字符串,而不是一个列表,配置文件中有很多KEY

终端日志 📒

[ERROR][2024-06-20 17:09:51][config.py:257] - can only concatenate list (not "str") to list
Traceback (most recent call last):
  File "/app/config.py", line 254, in drag_sensitive
    config_copy[key] = config_copy[key][0:3] + "*" * 5 + config_copy[key][-3:]
TypeError: can only concatenate list (not "str") to list
@zhayujie
Copy link
Owner

你好,你的镜像版本是多少,有更新到最新吗

@manjieqi
Copy link
Author

你好,你的镜像版本是多少,有更新到最新吗

最新,就前几天更新的那个

@6vision
Copy link
Collaborator

6vision commented Jun 24, 2024

拉取最新代码即可,修复了该问题

@6vision 6vision closed this as completed Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants