我正在尝试将XML文件转换为MarkDown,但是找不到转换python字典的示例。这是我的代码:
import pypandoc
import xmltodict
import json
datadict = open("/home/.../FIX44.xml")
dic = xmltodict.parse(datadict.read())
jsondump = json.dumps(dic)
#print jsondump
output = pypandoc.convert(jsondump, 'md', format='json', outputfile = 'test.md')
assert output == ""
当我尝试运行它时,我得到:
RuntimeError:Pandoc在转换期间因退出代码“ 1”而死