PaddleX
PaddleX copied to clipboard
预测报错RecursionError: maximum recursion depth exceeded
Checklist:
- 查找历史相关issue寻求解答
- 翻阅FAQ常见问题汇总和答疑
- 确认bug是否在新版本里还未修复
- 翻阅PaddleX 部署文档说明
描述问题
在使用pdx.deploy.Predictor进行预测的时候报错RecursionError: maximum recursion depth exceeded 发现在utils.py文件中,Timer类info方法中日志打印使用的print语句,emmmm,希望可以修改成logging更好一些,毕竟,文件头引入了logging 以下部分报错
Traceback (most recent call last):
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "bxy_wxzx.py", line 498, in process
data_list = self.bxyprocess.process(image, image_path)
File "bxy_wxzx.py", line 440, in process
cls = self.image_cls(new_images, filepath)
File "<decorator-gen-452>", line 2, in image_cls
File "/home/bxypython/.local/lib/python3.6/site-packages/retry/api.py", line 74, in retry_decorator
logger)
File "/home/bxypython/.local/lib/python3.6/site-packages/retry/api.py", line 33, in __retry_internal
return f()
File "bxy_wxzx.py", line 177, in image_cls
cls = self.cls_model.predict(images)
File "/home/bxypython/.local/lib/python3.6/site-packages/paddlex/deploy.py", line 260, in predict
self.timer.info(average=True)
File "/home/bxypython/.local/lib/python3.6/site-packages/paddlex/utils/utils.py", line 185, in info
print("------------------ Inference Time Info ----------------------")
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 41, in write
self.__convertor.write(text)
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 162, in write
self.write_and_convert(text)
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 190, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 195, in write_plain_text
self.wrapped.write(text[start:end])
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 41, in write
self.__convertor.write(text)
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 162, in write
self.write_and_convert(text)
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 190, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 195, in write_plain_text
self.wrapped.write(text[start:end])
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 41, in write
self.__convertor.write(text)
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 162, in write
self.write_and_convert(text)
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 190, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 195, in write_plain_text
self.wrapped.write(text[start:end])
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 41, in write
self.__convertor.write(text)
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 162, in write
self.write_and_convert(text)
File "/home/bxypython/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 190, in write_and_convert
self.write_plain_text(text, cursor, len(text))
复现
-
c++部署方式
-
您是否按照文档教程已经正常运行我们提供的demo?
-
您是否在demo基础上修改代码内容?还请您提供运行的代码
-
-
c#部署方式
-
您使用的模型和数据集是?
-
请提供您出现的报错信息及相关log
环境
-
如果您使用的是python部署方式,请提供您使用的PaddlePaddle、PaddleX版本号、Python版本号
-
如果您使用的是c++或c#部署方式,请提供您使用的PaddleX分支、推理引擎(例如PaddleInference)版本号
-
请提供您使用的操作系统信息,如Linux/Windows/MacOS
-
请问您使用的CUDA/cuDNN的版本号是?
补充环境 linux系统 paddle-bfloat 0.1.2 paddleocr 2.5.0.3 paddlepaddle-gpu 2.3.0 paddleslim 2.2.1 paddlex 2.1.0 python版本为3.6.8