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)

解决方案:

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

相关推荐
QYR-分析9 小时前
26.2% 高增!场内及园区无人物流车,厂内短驳自动化的 L4 货运载体
运维·自动化
熊猫钓鱼>_>9 小时前
鸿蒙 PC 三方库适配复盘:libfvad 1.0 —— 把 WebRTC VAD 做成能装进采集链路的静态库
服务器·开发语言·华为·harmonyos·openharmony·适配·鸿蒙pc
java_logo9 小时前
Docker 部署 DPanel:轻松搭建轻量容器管理平台
运维·docker·容器·podman·容器管理·dpanel·轩辕镜像
时间售卖铺9 小时前
Oracle DQL精髓:从基础到高级实战
运维·数据库·云原生·oracle
分布式存储与RustFS9 小时前
CI 老被 Docker Hub 的 429 卡住,自建 Registry 把镜像搬进内网
运维·docker·开源·镜像仓库·对象存储·ci·rustfs
Ruiery9 小时前
Linux 6.6内核内存管理深度解析(十七):vmalloc — 内核要“虚拟连续“就够:物理页逐个凑,页表来连
linux·运维·服务器
pt10439 小时前
Cisco设备网络安全系列-19:网络安全事件驱动与调整
运维·网络
sxgzzn9 小时前
如何利用无人机提升光伏巡检效率?
运维·重构·无人机·开关柜局放在线监测·光伏运维管理系统
R²AIN SUITE10 小时前
企业智能体平台私有化部署需要什么服务器?CPU、内存、显卡与项目管理集成的7个评估项
运维·服务器
坚定的共产主义生产设备永不宕机10 小时前
服务器从裸机开始搭建ESXI虚拟机
linux·服务器·网络