build error: 'pypandoc' has no attribute 'convert'

オープン
#19 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
build-system

調査の方向性

setup.py の 16 行目から始め、報告された pypandoc バージョンでビルドを再現します。利用可能な convert_file メソッドと convert_text メソッドを、そこで試みられている README.md-to-rst 変換と比較します。対応している pypandoc API でパッケージが正常にビルドされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Hello, I'm building pawk on an Arch Linux machine with packages:
pawk v.0.7.0
pypandoc 1.8.1
The build process halts on the following error:

Traceback (most recent call last):                                                                  
  File "/home/gaetan/.cache/pikaur/build/python-pawk/src/pawk-0.7.0/setup.py", line 16, in <module> 
    long_description = pypandoc.convert('README.md', 'rst')                                         
AttributeError: module 'pypandoc' has no attribute 'convert'                                        

I have also tried pip install pawk (pawk version is 0.6.5) and building git zip file with the same result.

Verification: the pypandoc I use has convert_file and convert_text methods, but no convert

>>> dir(pypandoc)
['DEFAULT_TARGET_FOLDER', 'Iterable', 'Union', '__all__', '__author__', '__author_email__', '__builtins__', '__cached__', '__classifiers__', '__description__', '__doc__', '__file__', '__license__', '__loader__', '__name__', '__package__', '__pandoc_path', '__path__', '__python_requires__', '__setup_requires__', '__spec__', '__url__', '__version', '__version__', '_as_unicode', '_check_log_handler', '_classify_pandoc_logging', '_convert_input', '_ensure_pandoc_path', '_get_base_format', '_get_pandoc_version', '_identify_format_from_path', '_identify_input_type', '_identify_path', '_is_network_path', '_validate_formats', 'absolute_import', 'cast_bytes', 'cast_unicode', 'clean_pandocpath_cache', 'clean_version_cache', 'convert_file', 'convert_text', 'download_pandoc', 'ensure_pandoc_installed', 'ensure_pandoc_maximal_version', 'ensure_pandoc_minimal_version', 'get_pandoc_formats', 'get_pandoc_formats_pre_1_18', 'get_pandoc_path', 'get_pandoc_version', 'glob', 'handler', 'logger', 'logging', 'normalize_format', 'os', 'pandoc_download', 'print_function', 'py3compat', 're', 'string_types', 'subprocess', 'sys', 'tempfile', 'textwrap', 'url2path', 'urlparse', 'with_statement']
>>> 

I tried to use convert_file in place of convert but could not make setup.py run without error.

主要言語
Python
スター
524
フォーク
32
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

alecthomas/pawk のほかの issue

alecthomas/pawk の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。