Skip to content

Commit dfce219

Browse files
author
Dan Dees
committed
setup.py - deprecated pypandoc.convert() -> pypandoc.convert_file()
python setup.py build Creating README.rst Traceback (most recent call last): File "/home/appsmith/asv/ports/repo/pypreprocessor/setup.py", line 22, in <module> long_description = pypandoc.convert('README.md', 'rst') AttributeError: module 'pypandoc' has no attribute 'convert' man-group/pytest-plugins#87 Hi there. I'm the maintainer of PyPandoc, which seems to be the root error in ops post. In the recent release of PyPandoc (version 1.8), the convert function was removed after a year of being deprecated. The solution here, is to either switch to pypandoc.convert_file or pypandoc.convert_text, depending
1 parent 5e8400a commit dfce219

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
# To update:
99
# - python setup.py sdist upload
1010

11-
import sys
1211
try:
1312
from setuptools import Command, setup
1413
except ImportError:
@@ -19,7 +18,7 @@
1918
try:
2019
import pypandoc
2120
print('Creating README.rst')
22-
long_description = pypandoc.convert('README.md', 'rst')
21+
long_description = pypandoc.convert_file('README.md', 'rst')
2322
except(IOError, ImportError):
2423
print('Pypandoc not installed, skipping README.rst creation')
2524
long_description = open('README.md').read()

0 commit comments

Comments
 (0)