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)

解决方案:

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

相关推荐
Orange_sparkle8 小时前
从 Docker 到 Doris:建立后端基础设施全景图
运维·docker·ai·容器·claude code
2601_962128269 小时前
Nginx目录结构
运维·nginx
MayZork9 小时前
Windows 与 Linux 下 vcpkg 的安装部署指南
linux·运维·windows
yyuuuzz9 小时前
记一次 VPS 性能排查:共享 CPU 突发额度导致的限流
运维·服务器·人工智能
冰雪青松9 小时前
Ubuntu 运维命令大全:从入门到精通的实战参考手册
运维·服务器·ubuntu
前端 贾公子10 小时前
第09章:上下文与记忆 (2)
java·服务器·前端
CDN36010 小时前
节点智能调度实操:解决出海区域访问快慢不均、节点拥堵、跨洋延迟高,CDN 全网择优落地方案
运维·服务器·网络
roman_日积跬步-终至千里10 小时前
【数据治理(6)】DataOps 不是调度工具,而是让数据产品长期可信的运行机制
java·服务器·网络
白清羽11 小时前
7.3系统安装docker
运维·docker·容器
Dovis(誓平步青云)11 小时前
折叠屏悬停看视频,上半屏和下半屏应该各做什么
android·java·服务器·开发语言·安全·音视频