#5220 Traceback (most recent call last):File "videotrans\mainwin\main_win.py", line 276, in XFile "videotrans\mainwin\main_win

2409:8a70* Posted at: 1 day ago

Traceback (most recent call last):
File "videotrans\mainwin\main_win.py", line 276, in
X
File "videotrans\mainwin\main_win.py", line 405, in open_winform
File "videotrans\winform\siliconflow.py", line 57, in openwin
File "videotrans\ui\siliconflow.py", line 123, in update_ui
TypeError: 'PySide6.QtWidgets.QLineEdit.setText' called with wrong
argument types:
PySide6.QtWidgets.QLineEdit.setText(int)
Supported signatures:
PySide6.QtWidgets.QLineEdit.setText(arg_1: str | None, )

1 Replies

错误原因是硅基流动配置中的某个参数(如api keymodel name)被保存成了数字类型,导致界面更新时setText()接收到整数而非字符串。

解决方法:

  1. 关闭软件,进入软件根目录下的 videotrans/ 文件夹。
  2. 用文本编辑器(记事本等)打开 params.json 文件。
  3. 搜索 "siliconflow" 或查找硅基流动相关的配置段(如 "guiji_key""guiji_model")。
  4. 将所有的值用双引号括起来,确保它们是字符串格式(例如 "guiji_key": "sk-xxx",而不是 "guiji_key": 123)。
  5. 保存文件,重新启动软件。

如果不想手动编辑,也可直接删除 params.jsoncfg.json 文件(会丢失所有其他设置),重新配置。

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update. Dondate: ko-fi.com/jianchang512

Related resource

Similar issues already exist