Alir3z4 / html2text

Convert HTML to Markdown-formatted text.
alir3z4.github.io/html2text/
GNU General Public License v3.0
1.76k stars 270 forks source link

Circular import error #364

Closed leftbones closed 4 months ago

leftbones commented 3 years ago
import urllib.request
import html2text

def get_html():
    return urllib.request.urlopen("http://www.google.com/").read().decode("utf-8", "ignore")

html = get_html()

text = html2text.html2text(html)
print(text)

This code (based on the basic usage example) is giving me the following error:

AttributeError: partially initialized module 'html2text' has no attribute 'html2text' (most likely due to a circular import)

Version: 2020.1.16 Python: 3.9.5

ish-codes-magic commented 7 months ago

Did you get any answer for this?

Alir3z4 commented 4 months ago

Closing as I cannot reproduce this, at least by the latest version at the time being (version: 2024.2.25).

Please feel free to open a new issue if the problem occurs again,