Open
Description
I have a question. I'm using markdown in a PyQt5 application, and am trying to package it for distribution using fbs/PyInstaller. The program crashes when the packaged result is executed with an error in line 30 of the htmlparser:
27 # Import a copy of the html.parser lib as `htmlparser` so we can monkeypatch it.
28 # Users can still do `from html import parser` and get the default behavior.
29 spec = importlib.util.find_spec('html.parser')
30 htmlparser = importlib.util.module_from_spec(spec)
31 spec.loader.exec_module(htmlparser)
32 sys.modules['htmlparser'] = htmlparser
The error reported is:
File "lib\site-packages\markdown\htmlparser.py", line 30, in <module>
File "<frozen importlib._bootstrap>", line 568, in module_from_spec
AttributeError: 'NoneType' object has no attribute 'loader'
Clearly it's not a bug, since it works correctly in the unpackaged code. I was wondering whether you're aware of any successful attempts to package markdown. Also, fbs is only approved for Python 3.6, although it is reported to work for 3.7. Is there anything about the code above that depends on > 3.6? I should also mention that the app works correctly when packaged if I remove the use of markdown.