goosewill
goosewill

Reputation: 61

AttributeError: module 'pypandoc' has no attribute 'convert'

I am trying to switch a python project over to poetry & pyproject.toml. Previously, we were using requirements.txt.

When I try to install pyspark 2.4.8 with poetry, however, I hit this error:

File "<string>", line 156, in <module>
AttributeError: module 'pypandoc' has no attribute 'convert'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Has anyone run into this? Do you know why this is an issue with poetry but not with requirements.txt?

Upvotes: 6

Views: 7568

Answers (3)

caleb
caleb

Reputation: 2817

Change the call from pypandoc.convert('README.md', 'rst') to pypandoc.convert_file('README.md', 'rst')

Upvotes: 1

I solved this problem with:

pip install pypandoc==1.5

Upvotes: 6

Sango
Sango

Reputation: 31

it seems you need to downgrade it since 'convert' was removed in the 1.8 version. https://github.com/man-group/pytest-plugins/issues/87

Upvotes: 2

Related Questions