Quast 5.0.2 Problem
1
0
Entering edit mode
3.9 years ago

Hi everyone,

I'm trying to run quast with python ./setup.py test to verify installation. And then it shows this error.

module 'cgi' has no attribute 'escape'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/quast-5.0.2-py3.8.egg/EGG-INFO/scripts/quast.py", line 307, in <module>
    return_code = main(sys.argv[1:])
  File "/usr/local/lib/python3.8/dist-packages/quast-5.0.2-py3.8.egg/EGG-INFO/scripts/quast.py", line 148, in main
    from quast_libs import basic_stats
  File "/usr/local/lib/python3.8/dist-packages/quast-5.0.2-py3.8.egg/quast_libs/basic_stats.py", line 15, in <module>
    from quast_libs.circos import set_window_size
  File "/usr/local/lib/python3.8/dist-packages/quast-5.0.2-py3.8.egg/quast_libs/circos.py", line 25, in <module>
    from quast_libs.icarus_utils import get_assemblies, check_misassembled_blocks, Alignment
  File "/usr/local/lib/python3.8/dist-packages/quast-5.0.2-py3.8.egg/quast_libs/icarus_utils.py", line 15, in <module>
    from quast_libs.html_saver.html_saver import trim_ref_name
  File "/usr/local/lib/python3.8/dist-packages/quast-5.0.2-py3.8.egg/quast_libs/html_saver/html_saver.py", line 18, in <module>
    from quast_libs.site_packages.jsontemplate import jsontemplate
  File "/usr/local/lib/python3.8/dist-packages/quast-5.0.2-py3.8.egg/quast_libs/site_packages/jsontemplate/jsontemplate.py", line 583, in <module>
    'html': cgi.escape,
AttributeError: module 'cgi' has no attribute 'escape'
ERROR! exception caught!
assembly quast qc • 2.8k views
ADD COMMENT
0
Entering edit mode

Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.
code_formatting

ADD REPLY
1
Entering edit mode
3.3 years ago
bstrope15 ▴ 10

If you open up the file jsontemplate.py, that is where the error is occurring:

You will first need to 'import html' somewhere near the beginning of the script, preferably where the other modules are imported. Then at line 583, replace "cgi.escape" to "html.escape"

ADD COMMENT
0
Entering edit mode

Thank you, it worked for me!

ADD REPLY

Login before adding your answer.

Traffic: 3186 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6