问题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)

解决方案:
你的数据库出问题了,出现了锁死,检查你的数据库。