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)

解决方案:

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

相关推荐
江华森15 分钟前
Spring Cloud 微服务全栈实战:从 Eureka 到 Docker Compose 一文贯通
运维
江华森15 分钟前
Matplotlib 数据绘图基础入门
运维
江华森17 分钟前
NumPy 数值计算基础入门
运维
乘云数字DATABUFF4 天前
5分钟部署开源APM Databuff:OpenTelemetry全链路追踪入门实战
运维·后端
荣--6 天前
一键部署不是为了省时间 —— 它是把"买来的 PaaS"变成"自己的平台"的拐点
运维·zabbix·工程化·一键部署·平台化·边界设计
江华森6 天前
动手实战学 Docker — 从零到集群编排完全指南
运维
Avan_菜菜7 天前
FRP 内网穿透完整实战:从 HTTP 映射到 HTTPS 自签代理
运维·nginx·https
SelectDB8 天前
Litefuse 开源并推出单进程轻量模式,25 秒就能跑起来的 Agent 可观测与评估平台
运维·后端·自动化运维
zzzzzz3109 天前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
XIAOHEZIcode9 天前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏