【Bug】AttributeError: module ‘gast‘ has no attribute ‘Index‘
pe
self._apply(transformer, node_wrapper, log_level=index + 1)
File “/home/ubuntu/anaconda3/envs/PPYOLO/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py”, line 65, in _apply
transformer(node_wrapper).transform()
File “/home/ubuntu/anaconda3/envs/PPYOLO/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/tensor_shape_transformer.py”, line 118, in transform
self.visit(self.root)
File “/home/ubuntu/anaconda3/envs/PPYOLO/lib/python3.8/ast.py”, line 371, in visit
return visitor(node)
File “/home/ubuntu/anaconda3/envs/PPYOLO/lib/python3.8/ast.py”, line 447, in generic_visit
value = self.visit(value)
File “/home/ubuntu/anaconda3/envs/PPYOLO/lib/python3.8/ast.py”, line 371, in visit
return visitor(node)
File “/home/ubuntu/anaconda3/envs/PPYOLO/lib/python3.8/ast.py”, line 447, in generic_visit
value = self.visit(value)
File “/home/ubuntu/anaconda3/envs/PPYOLO/lib/python3.8/ast.py”, line 371, in visit
return visitor(node)
File “/home/ubuntu/anaconda3/envs/PPYOLO/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/tensor_shape_transformer.py”, line 121, in visit_Assign
update_static_shape_var_node = self._update_name_to_var_shape(node)
File “/home/ubuntu/anaconda3/envs/PPYOLO/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/tensor_shape_transformer.py”, line 346, in _update_name_to_var_shape
slice_index_node = gast.Index(value=index_value_node)
AttributeError: module ‘gast’ has no attribute ‘Index’
使用PaddleOCR将训练好的识别模型转为推理模型时遇到的bug
在github上搜到同行们的解决办法:
pip install gast==0.3.3
参考
https://github.com/PaddlePaddle/PaddleOCR/issues/2602
【Bug】AttributeError: module ‘gast‘ has no attribute ‘Index‘相关推荐
- 【BUG】AttributeError: module ‘gast‘ has no attribute ‘Index’
1.问题:AttributeError: module 'gast' has no attribute 'Index' 2.解决方法: 原因:gast版本过高 pip install gast==0. ...
- 【Bug】AttributeError: module ‘cv2‘ has no attribute ‘imread‘
今天记录一下很伤悲(SB)的bug: AttributeError: module 'cv2' has no attribute 'imread' 准备学习一下opencv-python中的resiz ...
- 【Python】AttributeError: module ‘numpy’ has no attribute ‘unit8’ 的解决方法
经排查,下面的一行代码出了异常: mask2 = np.where((mask1 == 2) | (mask1 == 0), 0, 1).astype('unit8') 异常类型是: Attribut ...
- 【解决问题】AttributeError: module ‘pandas‘ has no attribute ‘ewma‘报错解决方法
将 ewma60=pd.ewma(aapl_px,span=60) 改为 ewma60 = pd.DataFrame.ewm(aapl_px,span=60).mean()
- python efficientdet AttributeError: module ‘gast‘ has no attribute ‘Num‘
今天在用efficientDet跑模型的时候,出现了下面的警告: WARNING:tensorflow:Entity <bound method RegressBoxes.call of < ...
- 【Python笔记】AttributeError: module 'urllib3' has no attribute 'PoolManager'
AttributeError: module 'urllib3' has no attribute 'PoolManager' 出现这个错误时一脸懵逼,连自动提示都有,为啥还会提示这个模块没有这个属性 ...
- 【TensorFlow报错】AttributeError: module 'tensorflow' has no attribute 'merge_all_summaries'
报错提示: cifar10_train.py : AttributeError: module 'tensorflow' has no attribute 'merge_all_summaries' ...
- 【报错】AttributeError: module ‘skimage‘ has no attribute ‘morphology‘
瞎试了一通!解决方法真是令人震惊! 问题描述 import skimage没有问题,用skimage.morphology报错.AttributeError: module 'skimage' has ...
- 【问题记录】AttributeError: module ‘colorama‘ has no attribute ‘init‘
前言 今天更新了下conda,更新的时候有报错.emmm,没看懂就忽略了,重新启动miniconda时发现报错了.然后就用不了了,这就很头疼.然后各种度娘才解决,以后再也不玩骚操作了 问题描述 A ...
最新文章
- CCF-CSP 201903-1 小中大(C++满分代码)
- RocketMQ-初体验RocketMQ(01)_RocketMQ初体验
- BASIS--Client 锁定和解锁
- 1021. Remove Outermost Parentheses删除最外层的括号
- BitArray虽好,但请不要滥用,又一次线上内存暴增排查
- LeetCode 311. 稀疏矩阵的乘法
- wordpress如何使用vim和markdown写blog
- TI-ONE 全程助力算法大赛,承包你的比赛平台和计算资源
- 草莓CDMS原创内容分销系统-微信小说平台系统v1.0
- 2020年数据库系统工程师下午真题及答案解析
- HDL.Companion.v2.8.R1.for.Windows linux64 编程开发软件
- access数据库窗体设计实验报告_Access2010实验报告
- 关于BPSK、QPSK的一些理解,以及MATLAB实现
- 【编译原理】 CS143 斯坦福大学公开课 第一周:简介
- 电脑上的网站服务器在哪里能看到,怎么样查看windows电脑服务器IP地址
- 读书笔记--《原则》
- Unity3D_Util_Editor_显示RectTransform的世界坐标和相对坐标
- 搭建私有云盘可能用到的软件
- test api mis
- Ubuntu下点阵汉字的字模读取与显示