Thykof
Thykof

Reputation: 995

read the docs build failed UnicodeDecodeError

I am on https://readthedocs.org, I try to build my projet doc written in python3.

settings:

documentation type : Sphinx html

programming language : python

use a virtualenv

python interpreter : CPython 3.x

it failed at:

 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

with:

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.

details at https://readthedocs.org/projects/crawler/builds/3711852

Upvotes: 0

Views: 239

Answers (1)

Danny Dyla
Danny Dyla

Reputation: 691

Your doc has bytes not in the range of 0-128 in it (non-ascii characters). During the build process it attempts to decode all characters using the ascii codec. Make sure you have stripped any special characters out of your docs.

Upvotes: 1

Related Questions