Why is pypandoc giving the error "RuntimeError: Missing format!" in this setup.py script?

2.1k Views Asked by At

I have a setup.py script for a module. This setup.py script features conversion of a Markdown README file to reStructuredText (suitable for PyPI). When an attempt is made to install this module using pip (sudo pip install supermodule), the following error is presented:

Collecting supermodule
  Downloading supermodule-2017.1.12.2329.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-GijMOu/supermodule/setup.py", line 43, in <module>
        main()
      File "/tmp/pip-build-GijMOu/supermodule/setup.py", line 14, in main
        long_description = pypandoc.convert("README.md", "rst"),
      File "/usr/local/lib/python2.7/dist-packages/pypandoc/__init__.py", line 50, in convert
        outputfile=outputfile, filters=filters)
      File "/usr/local/lib/python2.7/dist-packages/pypandoc/__init__.py", line 68, in _convert
        raise RuntimeError('Missing format!')
    RuntimeError: Missing format!

What is going wrong and how can I fix this?

The setup.py script is as follows:

#!/usr/bin/python
# -*- coding: utf-8 -*-

import os
import pypandoc
import setuptools

def main():

    setuptools.setup(
        name             = "supermodule",
        version          = "2017.01.12.2329",
        description      = "super module",
        long_description = pypandoc.convert("README.md", "rst"),
        url              = "https://github.com/user/supermodule",
        author           = "A. Person",
        author_email     = "[email protected]",
        license          = "GPLv3",
        py_modules       = [
                           "supermodule"
                           ],
        install_requires = [
                           "opencv",
                           "docopt",
                           "propyte",
                           "shijian",
                           "tonescale"
                           ],
        scripts          = [
                           "supermodule_test.py"
                           ],
        entry_points     = """
            [console_scripts]
            supermodule = supermodule:supermodule
        """
    )

def read(*paths):
    with open(os.path.join(*paths), "r") as filename:
        return filename.read()

if __name__ == "__main__":
    main()
0

There are 0 best solutions below