Error in mdx_latex.py, line 169: 'Registry' object does not support item assignment
MariosGkMeng opened this issue · 4 comments
MariosGkMeng commented
When I try to run:
import markdown
import mdx_latex
# text is input string ...
md = markdown.Markdown()
latex_mdx = mdx_latex.LaTeXExtension()
latex_mdx.extendMarkdown(md, markdown.__dict__) # <--- line that triggers the error
It gives me the following error:
Exception has occurred: TypeError
'Registry' object does not support item assignment
File "<path>\markdown2latex\mdx_latex.py", line 169, in extendMarkdown
md.treeprocessors['latex'] = latex_tp
File "<path>\markdown2latex\markdownToLatex.py", line 7, in <module>
latex_mdx.extendMarkdown(md, markdown.__dict__)
rufuspollock commented
Thanks for reporting. Can you provide details of python version etc.
MariosGkMeng commented
Yes:
- Python 3.10
xiabo0816 commented
File "<path>/mdx_latex.py", line 150, in extendMarkdown
md.treeprocessors['latex'] = latex_tp
TypeError: 'Registry' object does not support item assignment
got same error, Python 3.9.2
rufuspollock commented
I suspect this is fixed by #19 which i just merged. Would be nice if someone could fix the tests ...
If it is still broken let me know.