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.

Error to import getStringIO from reportlab.lib.utils

See original GitHub issue

Hello, how are you? I am getting error with xhtml2pdf library nowadays. ImportError: cannot import name 'getStringIO' from 'reportlab.lib.utils' (/usr/local/lib/python3.9/site-packages/reportlab/lib/utils.py)

Yeah, I found that reportlab library was upgraded on 18th of February. I am sure the error is occurring with this package upgrading. Can you please check and fix it as soon as possible?

Regards, Mark

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
masarlievcommented, Feb 24, 2022

There is fix #590 and merged. @LegoStormtroopr can you release new version with the fix?

2reactions
potasiakcommented, Feb 23, 2022

As a quick fix you can pin reportlab to version 3.6.6.

I highly doubt there will be a fix in xhtml2pdf anytime soon, given the latest release was in January 2020.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot import name 'getStringIO' from 'reportlab.lib.utils' #589
ImportError: cannot import name 'getStringIO ' from 'reportlab.lib.utils' (/usr/local/lib/python3.9/site-packages/reportlab/lib/utils.py).
Read more >
"ImportError: No module named reportlab.lib" - Stack Overflow
Most of the times errors like this are caused by an broken package, either in the package it self or in one of...
Read more >
python-reportlab breaks xhtml2pdf autopkgtest: cannot import ...
Debian Bug report logs - #1007012 python-reportlab breaks xhtml2pdf autopkgtest: cannot import name 'getStringIO' from 'reportlab.lib.utils'.
Read more >
reportlab.lib.utils API documentation - Pyng Tech
Safely evaluate an expression node or a string containing a Python expression. The string or node provided may only consist of the following...
Read more >
1808508 – python-reportlab fails to build with Python 3.9
Bug 1808508 - python-reportlab fails to build with Python 3.9: ... line 21, in <module> from reportlab.lib.utils import isCompactDistro, ...
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