Closed Lautron closed 2 years ago
Hi @Lautron, from your link Getting Started I can see you are probably using a fork of mistletoe: https://github.com/executablebooks/mistletoe-ebp? Or, maybe you have just opened a wrong documentation page for mistletoe?
Anyway, the error in your "Code that caused the error" seems to be hidden in the fact Document()
, or Document.read()
in your case, expects that you pass an iterator object like a file into it. But you pass a string instead - that's why you get the error. So try to replace this:
return md_file.read()
with this:
return md_file
I hope that helps. :)
Hi @Lautron, from your link Getting Started I can see you are probably using a fork of mistletoe: https://github.com/executablebooks/mistletoe-ebp? Or, maybe you have just opened a wrong documentation page for mistletoe?
Anyway, the error in your "Code that caused the error" seems to be hidden in the fact
Document()
, orDocument.read()
in your case, expects that you pass an iterator object like a file into it. But you pass a string instead - that's why you get the error. So try to replace this:return md_file.read()
with this:
return md_file
I hope that helps. :)
Ohh, I see, I made a silly mistake. It seems that I googled "mistletoe docs" and opened the first website that showed up without realising it was a fork.
Thanks for you help :)
Error message
Tried using Python3.6 and Python3.10, but got the same error in both versions.
Code that caused the error
Example in Docs
From "Programatic Use" section on Getting Started
Final comment
I am willing to help with whatever I can and I hope I'm not wasting anyone's time.