天天看点

2021.02.03丨quast报错module ‘cgi‘ has no attribute ‘escape‘解决办法

最近采购了新服务器,在上面第一次跑组装,按正常流程要进行组装评估,在使用quast的过程中发生了报错,报错如下:

2021.02.03丨quast报错module ‘cgi‘ has no attribute ‘escape‘解决办法

抓重点,问题在于cgi.escape,里面其实有提示,‘html’:cgi.escape,

解决方法:

根据报错路径,找到最后一个报错文件

/home/yangxin/miniconda3/lib/python3.8/site-packages/quast-5.0.2-py3.8.egg/quast_libs/site_packages/jsontemplate/jsontemplate.py

打开jsontemplate.py ,修改里面的代码

vim jsontemplate.py

使用“/”,检索import cgi,在import cgi下加入import html

使用“/”,检索cgi,凡是遇到cgi.escape,都改成html.escape

保存后重新运行

2021.02.03丨quast报错module ‘cgi‘ has no attribute ‘escape‘解决办法

似乎使用其他软件也会遇到这种情况,解决办法相同,只不过文件不同。

继续阅读