0

我在https://readthedocs.org上,我尝试构建用 python3 编写的项目文档。

设置:

文档类型:Sphinx html

编程语言:python

使用虚拟环境

python解释器:CPython 3.x

它失败了:

 python /home/docs/checkouts/readthedocs.org/user_builds/crawler/envs/develop/bin/pip install --exists-action=w --cache-dir /home/docs/checkouts/readthedocs.org/user_builds/crawler/.cache/pip -rrequirements.txt

和:

Collecting reppy==0.3.1 (from -r requirements.txt (line 1))
  Using cached reppy-0.3.1.tar.gz
Collecting PyMySQL==0.7.1 (from -r requirements.txt (line 2))
  Using cached PyMySQL-0.7.1-py2.py3-none-any.whl
Collecting pytest==2.8.7 (from -r requirements.txt (line 3))
  Using cached pytest-2.8.7-py2.py3-none-any.whl
Collecting paramiko==1.16.0 (from -r requirements.txt (line 4))
  Using cached paramiko-1.16.0-py2.py3-none-any.whl
Collecting python-dateutil!=2.0,>=1.5 (from reppy==0.3.1->-r requirements.txt (line 1))
  Using cached python_dateutil-2.4.2-py2.py3-none-any.whl
Collecting url (from reppy==0.3.1->-r requirements.txt (line 1))
  Using cached url-0.1.5.tar.gz
Requirement already satisfied (use --upgrade to upgrade): requests in /home/docs/checkouts/readthedocs.org/user_builds/crawler/envs/develop/lib/python3.4/site-packages (from reppy==0.3.1->-r requirements.txt (line 1))
Collecting py>=1.4.29 (from pytest==2.8.7->-r requirements.txt (line 3))
  Using cached py-1.4.31-py2.py3-none-any.whl
Collecting pycrypto!=2.4,>=2.1 (from paramiko==1.16.0->-r requirements.txt (line 4))
  Using cached pycrypto-2.6.1.tar.gz
Collecting ecdsa>=0.11 (from paramiko==1.16.0->-r requirements.txt (line 4))
  Using cached ecdsa-0.13-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /home/docs/checkouts/readthedocs.org/user_builds/crawler/envs/develop/lib/python3.4/site-packages (from python-dateutil!=2.0,>=1.5->reppy==0.3.1->-r requirements.txt (line 1))
Collecting publicsuffix (from url->reppy==0.3.1->-r requirements.txt (line 1))
  Using cached publicsuffix-1.1.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-x29p0rqe/publicsuffix/setup.py", line 19, in <module>
        long_description=get_long_description(),
      File "/tmp/pip-build-x29p0rqe/publicsuffix/setup.py", line 13, in get_long_description
        read_doc("LICENSE")
      File "/tmp/pip-build-x29p0rqe/publicsuffix/setup.py", line 7, in read_doc
        return open(os.path.join(os.path.dirname(__file__), name)).read()
      File "/home/docs/checkouts/readthedocs.org/user_builds/crawler/envs/develop/lib/python3.4/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 23: ordinal not in range(128)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-x29p0rqe/publicsuffix
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

https://readthedocs.org/projects/crawler/builds/3711852上的详细信息

4

1 回答 1

1

您的文档中的字节不在0-128其中(非 ascii 字符)。在构建过程中,它尝试使用 ascii 编解码器解码所有字符。确保您已从文档中删除任何特殊字符。

于 2016-02-09T13:37:34.223 回答