Skip to content

UnicodeDecodeError: 'ascii' codec can't decode byte #363

@mschwager

Description

@mschwager
$ sudo pip install pygit2
[sudo] password for matt: 
Downloading/unpacking pygit2
  Downloading pygit2-0.20.3.tar.gz (146kB): 146kB downloaded
  Running setup.py (path:/tmp/pip_build_root/pygit2/setup.py) egg_info for package pygit2

Installing collected packages: pygit2
  Running setup.py install for pygit2
    building '_pygit2' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -Iinclude -I/usr/include/python2.7 -c src/note.c -o build/temp.linux-x86_64-2.7/src/note.o
    In file included from src/utils.h:34:0,
                     from src/note.c:32:
    src/types.h:83:5: error: unknown type name ‘git_config_iterator’
         git_config_iterator *iter;
         ^
    In file included from /usr/include/python2.7/Python.h:80:0,
                     from src/note.c:29:
    /usr/include/python2.7/object.h:81:12: error: unknown type name ‘git_diff’
         struct _typeobject *ob_type;
                ^
    src/types.h:57:13: note: in expansion of macro ‘PyObject_HEAD’
                 PyObject_HEAD\
                 ^
    src/types.h:103:1: note: in expansion of macro ‘SIMPLE_TYPE’
     SIMPLE_TYPE(Diff, git_diff, list)
     ^
    /usr/include/python2.7/object.h:81:12: error: unknown type name ‘git_blame’
         struct _typeobject *ob_type;
                ^
    src/types.h:57:13: note: in expansion of macro ‘PyObject_HEAD’
                 PyObject_HEAD\
                 ^
    src/types.h:230:1: note: in expansion of macro ‘SIMPLE_TYPE’
     SIMPLE_TYPE(Blame, git_blame, blame)
     ^
    In file included from src/utils.h:34:0,
                     from src/note.c:32:
    src/types.h:255:5: error: unknown type name ‘git_merge_result’
         git_merge_result *result;
         ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pygit2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lf_re3-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/pygit2

copying pygit2/repository.py -> build/lib.linux-x86_64-2.7/pygit2

copying pygit2/version.py -> build/lib.linux-x86_64-2.7/pygit2

copying pygit2/credentials.py -> build/lib.linux-x86_64-2.7/pygit2

copying pygit2/settings.py -> build/lib.linux-x86_64-2.7/pygit2

copying pygit2/__init__.py -> build/lib.linux-x86_64-2.7/pygit2

running build_ext

building '_pygit2' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/src

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -Iinclude -I/usr/include/python2.7 -c src/note.c -o build/temp.linux-x86_64-2.7/src/note.o

In file included from src/utils.h:34:0,

                 from src/note.c:32:

src/types.h:83:5: error: unknown type name ‘git_config_iterator’

     git_config_iterator *iter;

     ^

In file included from /usr/include/python2.7/Python.h:80:0,

                 from src/note.c:29:

/usr/include/python2.7/object.h:81:12: error: unknown type name ‘git_diff’

     struct _typeobject *ob_type;

            ^

src/types.h:57:13: note: in expansion of macro ‘PyObject_HEAD’

             PyObject_HEAD\

             ^

src/types.h:103:1: note: in expansion of macro ‘SIMPLE_TYPE’

 SIMPLE_TYPE(Diff, git_diff, list)

 ^

/usr/include/python2.7/object.h:81:12: error: unknown type name ‘git_blame’

     struct _typeobject *ob_type;

            ^

src/types.h:57:13: note: in expansion of macro ‘PyObject_HEAD’

             PyObject_HEAD\

             ^

src/types.h:230:1: note: in expansion of macro ‘SIMPLE_TYPE’

 SIMPLE_TYPE(Blame, git_blame, blame)

 ^

In file included from src/utils.h:34:0,

                 from src/note.c:32:

src/types.h:255:5: error: unknown type name ‘git_merge_result’

     git_merge_result *result;

     ^

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pygit2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lf_re3-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pygit2
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 47: ordinal not in range(128)

I've recently updated to Ubuntu 14.04. I didn't have pygit2 installed before then, but that could have something to do with it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions