question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

python 3.8.0 AttributeError: module 'cgi' has no attribute 'escape'

See original GitHub issue

pisaStatus = pisa.CreatePDF(html, dest=file) File "/Users/disonds/PycharmProjects/PythonHomework/venv/lib/python3.8/site-packages/xhtml2pdf/document.py", line 136, in pisaDocument doc.build(context.story) File "/Users/disonds/PycharmProjects/PythonHomework/venv/lib/python3.8/site-packages/reportlab/platypus/doctemplate.py", line 1056, in build self.handle_flowable(flowables) File "/Users/disonds/PycharmProjects/PythonHomework/venv/lib/python3.8/site-packages/reportlab/platypus/doctemplate.py", line 915, in handle_flowable self.afterFlowable(f) File "/Users/disonds/PycharmProjects/PythonHomework/venv/lib/python3.8/site-packages/xhtml2pdf/xhtml2pdf_reportlab.py", line 122, in afterFlowable cgi.escape(copy.deepcopy(flowable.text), 1), AttributeError: module 'cgi' has no attribute 'escape'

update pip please

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:6

github_iconTop GitHub Comments

5reactions
luiszacommented, Jan 18, 2020

Hi, Version 2.2.4 was released.

3reactions
luiszacommented, Jan 17, 2020

Hi guys, probably I will make a new release next sunday, thanks for your colaborations

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: module 'cgi' has no attribute 'escape' · Issue #157
Hi, When I run quast, I got this error. Could you help me to figure it out? `/usr/local/bin/quast -t 2 -o ASSEMBLY/QUAST_out -m...
Read more >
1827745 – Python 3.8: module 'cgi' has no attribute 'escape'
Description of problem: urlwatch uses cgi.escape which was deprecated in Python 3.7 and removed in 3.8. A possible alternative is html.escape.
Read more >
html - Getting this error with py2.7 as well as with py3.7
I think, you need to add import html under import cgi and then change cgi.escape to html.escape .
Read more >
AttributeError: module 'cgi' has no attribute 'escape' in Python ...
Hi, when running the function junit2html with Python 3.8 and ... AttributeError: module 'cgi' has no attribute 'escape' in Python 3.8.
Read more >
module 'cgi' has no attribute 'escape' when using mozlog
My project is using Python 3.8. Actual results: Got errors like below. mozlog.structuredlog: Failure calling log handler: Traceback (most recent call last):
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found