Ubuntu22.04项目运行问题解决方案

问题1:

AttributeError: 'ClassDef' object has no attribute 'type_params'

或者

raise Exception(

Ubuntu-Server python32524639: Exception: During ast indexing the file "attr = getattr(node, field)" with error msg: "AttributeError: 'ClassDef' object has no attribute 'type_params'", please double check the origin file /home/jhx/anaconda3/envs/hszb/lib/python3.11/site-packages/modelscope/models/cv/tinynas_classfication/plain_net_utils.py to see whether the file is correctly edited.

解决方案:

更新你的modelscope=1.14.0,主要还是你的python版本与modelscope不符合导致。

python 复制代码
pip install modelscope==1.14.0

问题2:

pymysql.err.OperationalError: (1205, 'Lock wait timeout exceeded; try restarting transaction')

并且

sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1205, 'Lock wait timeout exceeded; try restarting transaction')

SQL: UPDATE perform_tasks SET image_status=%(image_status)s, image_finish=%(image_finish)s, status=%(status)s, finishtime=%(finishtime)s WHERE perform_tasks.id = %(perform_tasks_id)s

parameters: {'image_status': 2, 'image_finish': datetime.datetime(2026, 3, 29, 12, 19, 28, 288822), 'status': 2, 'finishtime': datetime.datetime(2026, 3, 29, 12, 19, 28, 288836), 'perform_tasks_id': 2038103860651884547}

(Background on this error at: https://sqlalche.me/e/20/e3q8)

解决方案:

你的数据库出问题了,出现了锁死,检查你的数据库。

相关推荐
Yana.nice3 小时前
Linux 只保留 30 天内日志(find命令删除日志文件)
linux·运维·chrome
2601_960567966 小时前
电商套图自动化效率的工程量化分析——从逐张生成到批量套图的架构演进
运维·架构·自动化
吳所畏惧6 小时前
宝塔面板Redis密码修改指南:SSH命令修改 vs 面板UI界面修改,哪个更靠谱?
运维·服务器·数据库·redis·缓存·ssh
DFT计算杂谈6 小时前
无 Root 权限在 Tesla K80 零门槛部署 DeepSeek 大模型
linux·服务器·网络·数据库·机器学习
HiDev_7 小时前
【非标自动化】2、认识元器件(确定目标)
运维·自动化
维天说7 小时前
CLI-Switch 2026年3月版历史设计:Hook、TTY 隔离与 JSON 状态
java·服务器·json
Zhang~Ling8 小时前
从 fopen 到 struct file:从零开始拆解 Linux 文件 I/O
linux·运维·服务器
爱写代码的阿森8 小时前
鸿蒙三方库 | harmony-utils之PreferencesUtil首选项数据监听详解
服务器·华为·harmonyos·鸿蒙·huawei
爱写代码的森8 小时前
蒙三方库 | harmony-utils之FileUtil文件重命名与属性查询详解
linux·运维·服务器·华为·harmonyos·鸿蒙·huawei
中微极客8 小时前
2026主流AI Agent框架技术选型与性能对比
运维·网络·人工智能