Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small issue with pypandoc and common_setup (hit while installing pytest-profiling) #87

Open
beaugunderson opened this issue Jul 1, 2018 · 4 comments
Labels

Comments

@beaugunderson
Copy link

beaugunderson commented Jul 1, 2018

If the pypandoc module is installed but pandoc is not then import pypandoc will succeed but the pypandoc module will not have a convert attribute when imported, leading to an AttributeError being raised, which common_setup does not currently catch.

The workaround for us is to install pandoc before doing our pip installs so that the convert attribute exists when it needs to.

It would be nice if common_setup could catch the AttributeError, so that the installation order wouldn't matter.

@beaugunderson
Copy link
Author

beaugunderson commented Jul 1, 2018

Hmm... I reversed the installation order (pandoc before pypandoc and pytest-profiling) and the error persists:

Collecting pytest-profiling==1.3.0 (from -r requirements.txt (line 136))
  Downloading https://files.pythonhosted.org/packages/f5/34/4626126e041a51ef50a80d0619519b18d20aef249aac25b0d0fdd47e57ee/pytest-profiling-1.3.0.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-install-xhgcq3du/pytest-profiling/setup.py", line 40, in <module>
        kwargs = common_setup('pytest_profiling')
      File "/tmp/pip-install-xhgcq3du/pytest-profiling/common_setup.py", line 54, in common_setup
        long_description = pypandoc.convert(readme_file, 'rst')
    AttributeError: module 'pypandoc' has no attribute 'convert'

@beaugunderson
Copy link
Author

It also appears that the availability of convert does not depend on pandoc being installed; I was mistaken about that. I don't currently see a way for this error to happen, though since the README doesn't matter for those just wanting to install the module I think the AttributeError should be caught.

@eeaston eeaston added the bug label Nov 19, 2021
@shmpwk
Copy link

shmpwk commented May 11, 2022

We have the similar isssue https://github.com/autowarefoundation/autoware/discussions/286.
I created PR for the issue by #205

@JessicaTegner
Copy link

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

ThomasG77 added a commit to ThomasG77/guides.etalab.gouv.fr that referenced this issue May 16, 2022
Si on n'installe pas une version de pypandoc spécifique avant l'installation de pandoc-latex-environment, il installe la dernière version e.g https://github.com/chdemko/pandoc-latex-environment/blob/189abc88118e99d71594d771f3c2a29f7ea635bf/setup.py#L110
La dernière version la 1.8 plante le workflow man-group/pytest-plugins#87 (comment) car la méthode convert dépréciée depuis 1 an a été supprimée et remplacée.
dand-oss pushed a commit to dand-oss/pypreprocessor that referenced this issue Jun 1, 2022
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
abulte added a commit to etalab/guides.etalab.gouv.fr that referenced this issue Jun 14, 2022
* Update ci.yml

Si on n'installe pas une version de pypandoc spécifique avant l'installation de pandoc-latex-environment, il installe la dernière version e.g https://github.com/chdemko/pandoc-latex-environment/blob/189abc88118e99d71594d771f3c2a29f7ea635bf/setup.py#L110
La dernière version la 1.8 plante le workflow man-group/pytest-plugins#87 (comment) car la méthode convert dépréciée depuis 1 an a été supprimée et remplacée.

* Pin emoji~=1.6.3

Co-authored-by: Alexandre Bulté <alexandre.bulte@data.gouv.fr>
Co-authored-by: Alexandre Bulté <alexandre@bulte.net>
fuglede added a commit to fuglede/injector that referenced this issue Jun 15, 2022
This fixes an issue that breaks the build when using `pypandoc` 1.8 and above in which `convert` has been removed; see man-group/pytest-plugins#87 (comment)
jstasiak pushed a commit to python-injector/injector that referenced this issue Jul 11, 2022
This fixes an issue that breaks the build when using `pypandoc` 1.8
and above in which `convert` has been removed; see
man-group/pytest-plugins#87 (comment)
lucidsushi added a commit to lucidsushi/cookiecutter-pypackage-more-minimal that referenced this issue Jul 22, 2022
Kami pushed a commit to Kami/codespeed that referenced this issue Aug 10, 2022
lemenkov added a commit to lemenkov/vvm that referenced this issue Oct 31, 2022
Looks like setuptools-markdown is deprecated in favor of a built-in
setuptools functionality. Worse is that setuptools_markdown isn't
compatible with a recent versions of a pypandoc library. Let's just drop
it.

See also  man-group/pytest-plugins#87.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
lemenkov added a commit to lemenkov/py-solc-x that referenced this issue Oct 31, 2022
Looks like setuptools-markdown is deprecated in favor of a built-in
setuptools functionality. Worse is that setuptools_markdown isn't
compatible with a recent versions of a pypandoc library. Let's just drop
it.

See also man-group/pytest-plugins#87.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
lemenkov added a commit to lemenkov/pyrlp that referenced this issue Nov 1, 2022
Looks like setuptools-markdown is deprecated in favor of a built-in
setuptools functionality. Worse is that setuptools_markdown isn't
compatible with a recent versions of a pypandoc library. Let's just drop
it.

See also man-group/pytest-plugins#87.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
lemenkov added a commit to lemenkov/pyrlp that referenced this issue Nov 1, 2022
Looks like setuptools-markdown is deprecated in favor of a built-in
setuptools functionality. Worse is that setuptools_markdown isn't
compatible with a recent versions of a pypandoc library. Let's just drop
it.

See also man-group/pytest-plugins#87.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
fourfridays added a commit to wrds/algoliasearch-django that referenced this issue Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants