msprev / panzer

pandoc + styles
BSD 3-Clause "New" or "Revised" License
160 stars 13 forks source link

Traceback error on panzer invocation #27

Closed mhminai closed 7 years ago

mhminai commented 7 years ago

I updated panzer today using the call pip3 install --upgrade git+https://github.com/msprev/panzer. When I run panzer now it gives me a traceback error:

Traceback (most recent call last):
  File "/usr/local/bin/panzer", line 11, in <module>
    load_entry_point('panzer==1.1', 'console_scripts', 'panzer')()
  File "/usr/local/lib/python3.6/site-packages/panzer/panzer.py", line 40, in main
    global_styledef, local_styledef = load.load_all_styledefs(doc.options)
  File "/usr/local/lib/python3.6/site-packages/panzer/load.py", line 58, in load_all_styledefs
    global_styledef = load_styledef(support_dir, options)
  File "/usr/local/lib/python3.6/site-packages/panzer/load.py", line 134, in load_styledef
    return meta.get_metadata(ast)
  File "/usr/local/lib/python3.6/site-packages/panzer/meta.py", line 176, in get_metadata
    metadata = ast['meta']
TypeError: list indices must be integers or slices, not str

I had updated my python using brew upgrade, not sure if that could be the cause of the problem.

mhminai commented 7 years ago

Am on pandoc 1.17.0.2, that is probably it. Sorry for the false alarm. Shall check and close this issue if that is the case.

msprev commented 7 years ago

It looks like that to me... The ast format was changed in pandoc 18.

mhminai commented 7 years ago

Confiming that the problem does not happen with pandoc 1.19.1 which is currently the latest version of pandoc