pandoc
pandoc copied to clipboard
Incompatible API versions
import pandoc
md = """
# Header 1
## Header 1.1
### Header 1.2
"""
doc = pandoc.read(md)
md_out = pandoc.write(doc, format="markdown", options=["-s", "--toc"])
print(md_out)
Stderr: | JSON parse error: Error in $: Incompatible API versions: encoded with [1,22,2,1] but attempted to decode with [1,23].
python = ">=3.12.1,<3.13" pip = ">=24.0,<25" pandoc = ">=3.1.3,<3.2"
Latest pandoc (Python) from Pypi
FYI: Have just tried the released beta version v2.4b0 and can confirm that this doesn't seem to be an error for the following combination of packages:
- Python 3.11.7
- pip 23.3.1
- pandoc 3.1.11.1
This is running within pyenv 2.3.35-11-g9908daf8
The error doesn't occur here either on the 2.4b0 release.
- pandoc 3.1.3
- pip 23.3.2
- Python 3.12.3