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‘相关推荐

  1. 【BUG】AttributeError: module ‘gast‘ has no attribute ‘Index’

    1.问题:AttributeError: module 'gast' has no attribute 'Index' 2.解决方法: 原因:gast版本过高 pip install gast==0. ...

  2. 【Bug】AttributeError: module ‘cv2‘ has no attribute ‘imread‘

    今天记录一下很伤悲(SB)的bug: AttributeError: module 'cv2' has no attribute 'imread' 准备学习一下opencv-python中的resiz ...

  3. 【Python】AttributeError: module ‘numpy’ has no attribute ‘unit8’ 的解决方法

    经排查,下面的一行代码出了异常: mask2 = np.where((mask1 == 2) | (mask1 == 0), 0, 1).astype('unit8') 异常类型是: Attribut ...

  4. 【解决问题】AttributeError: module ‘pandas‘ has no attribute ‘ewma‘报错解决方法

    将 ewma60=pd.ewma(aapl_px,span=60) 改为 ewma60 = pd.DataFrame.ewm(aapl_px,span=60).mean()

  5. python efficientdet AttributeError: module ‘gast‘ has no attribute ‘Num‘

    今天在用efficientDet跑模型的时候,出现了下面的警告: WARNING:tensorflow:Entity <bound method RegressBoxes.call of < ...

  6. 【Python笔记】AttributeError: module 'urllib3' has no attribute 'PoolManager'

    AttributeError: module 'urllib3' has no attribute 'PoolManager' 出现这个错误时一脸懵逼,连自动提示都有,为啥还会提示这个模块没有这个属性 ...

  7. 【TensorFlow报错】AttributeError: module 'tensorflow' has no attribute 'merge_all_summaries'

    报错提示: cifar10_train.py : AttributeError: module 'tensorflow' has no attribute 'merge_all_summaries' ...

  8. 【报错】AttributeError: module ‘skimage‘ has no attribute ‘morphology‘

    瞎试了一通!解决方法真是令人震惊! 问题描述 import skimage没有问题,用skimage.morphology报错.AttributeError: module 'skimage' has ...

  9. 【问题记录】AttributeError: module ‘colorama‘ has no attribute ‘init‘

    前言   今天更新了下conda,更新的时候有报错.emmm,没看懂就忽略了,重新启动miniconda时发现报错了.然后就用不了了,这就很头疼.然后各种度娘才解决,以后再也不玩骚操作了 问题描述 A ...

最新文章

  1. CCF-CSP 201903-1 小中大(C++满分代码)
  2. RocketMQ-初体验RocketMQ(01)_RocketMQ初体验
  3. BASIS--Client 锁定和解锁
  4. 1021. Remove Outermost Parentheses删除最外层的括号
  5. BitArray虽好,但请不要滥用,又一次线上内存暴增排查
  6. LeetCode 311. 稀疏矩阵的乘法
  7. wordpress如何使用vim和markdown写blog
  8. TI-ONE 全程助力算法大赛,承包你的比赛平台和计算资源
  9. 草莓CDMS原创内容分销系统-微信小说平台系统v1.0
  10. 2020年数据库系统工程师下午真题及答案解析
  11. HDL.Companion.v2.8.R1.for.Windows linux64 编程开发软件
  12. access数据库窗体设计实验报告_Access2010实验报告
  13. 关于BPSK、QPSK的一些理解,以及MATLAB实现
  14. 【编译原理】 CS143 斯坦福大学公开课 第一周:简介
  15. 电脑上的网站服务器在哪里能看到,怎么样查看windows电脑服务器IP地址
  16. 读书笔记--《原则》
  17. Unity3D_Util_Editor_显示RectTransform的世界坐标和相对坐标
  18. 搭建私有云盘可能用到的软件
  19. test api mis
  20. Ubuntu下点阵汉字的字模读取与显示

热门文章

  1. js按照“数字-字符-汉字拼音”排序
  2. uC/OS-II如何使任务在就绪表中进入就绪态与退出就绪态
  3. gvrp VLAN注册协议
  4. R4S搭配紫光展锐5G模组测试演示
  5. gephi mysql_【转】使用GEPHI做社会化关系图
  6. 一份北大信科内部流传的 CS 自救指南
  7. 8254定时/计数器实验
  8. windows NT简介
  9. php怎么获取表单,PHP如何获取表单(2)
  10. python读取cad中的文字,使用Python读写Redis字符串