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

问题1:

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

或者

raise Exception(

Ubuntu-Server python3[2524639]: 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)

解决方案:

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

相关推荐
忘了ʷºᵇₐ1 天前
在IDEA 2024.1版本中如何打开Remote Host及连接linux
linux·运维·服务器
upp1 天前
[最新版本centos 10系统制作与安装]
linux·运维·centos
一战成名9961 天前
ToDesk全球节点 vs TeamViewer、AnyDesk延迟与稳定性对比
运维·服务器·teamviewer
桌面运维家1 天前
VHD/VHDX 数据守护:BAT位图校验与修复
linux·服务器·网络
pupudawang1 天前
Linux下安装Nginx服务及systemctl方式管理nginx详情
linux·运维·nginx
ipad协议开发1 天前
视频号直播间全功能自动化场控插件开发指南:基于 API 调用的全链路拆解
运维·微信·自动化·视频·ipad
维度攻城狮1 天前
Docker优雅地运行OpenClaw
运维·docker·容器·openclaw·openclaw安装
淼淼爱喝水1 天前
openEuler 下 Ansible 基础命令详解与实操演示2
linux·运维·windows
拾贰_C1 天前
【Ubuntu | install | 安装软件】 Ubuntu软件安装多种方式以及卸载
linux·运维·ubuntu
梦想的旅途21 天前
效率革命:实现外部群聊信息的自动化同步方案
运维·自动化