Skip to content

:Pandoc pdf fails with Python AttributeError #224

@hbhargava7

Description

@hbhargava7

Attempting to run :Pandoc! pdf with a markdown file open leads to the following error:

Error detected while processing function pandoc#command#Pandoc:
line    5:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/hbhargava/.vim/bundle/vim-pandoc/pythonx/vim_pandoc/command.py", line 224, in __call__
    output_format = c_args.pop(0) if len(c_args) > 0 and self.opts.in_allowed_formats(c_args[0]) else "
html"
  File "/Users/hbhargava/.vim/bundle/vim-pandoc/pythonx/vim_pandoc/command.py", line 185, in in_allowed
_formats
    if not identifier.startswith("markdown") and identifier in PandocHelpParser.get_output_formats_tabl
e():
  File "/Users/hbhargava/.vim/bundle/vim-pandoc/pythonx/vim_pandoc/command.py", line 134, in get_output
_formats_table
    for i in PandocHelpParser._get_output_formats():
  File "/Users/hbhargava/.vim/bundle/vim-pandoc/pythonx/vim_pandoc/command.py", line 129, in _get_outpu
t_formats
    return wrap_formats(get_raw_pandoc_data("Output formats:(.*)\[\*+for pdf"))
  File "/Users/hbhargava/.vim/bundle/vim-pandoc/pythonx/vim_pandoc/command.py", line 74, in get_raw_pan
doc_data
    return re.search(pattern, data, re.DOTALL).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

I have updated to the latest version of vim-pandoc. The document I am attempting to run the command on is a .md file. This is the first time I have tried to use the plugin, though, so it could be an issue with my installation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions