V
V
Vitaly2015-07-03 23:51:04
PHP
Vitaly, 2015-07-03 23:51:04

'ascii' codec can't decode byte 0xd0 in position 108 error how to fix?

Hello, I have encountered the following error.d075880e646744ea989e8df2a5ed24d3.png

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

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/home/vitali/pro/env/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w

In file included from src/lxml/lxml.etree.c:239:0:

/home/vitali/pro/env/build/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: Нет такого файла или каталога

 #include "libxml/xmlversion.h"

                               ^

compilation terminated.

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

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

This happens when installing the package for django-cms pip install aldryn-newsblog
How can I fix this?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry, 2018-10-24
@SpideR-KOSS

Good morning.
Pass e to the function and add the e.preventDefault() parameter

$("#form").submit(function (e) { // Устанавливаем событие отправки для формы с id=form
           e.preventDefault();
            var form_data = $(this).serialize(); // Собираем все данные из формы
            $.ajax({
                type: "POST", // Метод отправки
                url: "public/script/send.php", // Путь до php файла отправителя
                data: form_data,
                success: function () {
                    // Код в этом блоке выполняется при успешной отправке сообщения
                    alert("Ваше сообщение отправлено!");
                }
            });
        });

M
marazmiki, 2015-07-04
@allposts_vitali

/home/vitali/pro/env/build/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory

Here it is, Cyrillic. And at the same time, the root cause: there are no libxml header files. Install this library and the error, at least this one, will be gone. For debian-based systems: apt-get install libxml2-dev. Or, which will surely save you other problems, apt-get install libxslt1-dev (this package will automatically install libxml2-dev)

V
Vov Vov, 2015-07-04
@balamut108

Cyrillic on the way. Most likely when trying to read from a temporary folder that you have written using the Cyrillic path. In other libraries, I treated, either by specifying the temporary directory forcibly, or by ready-made binaries for Windows. Look may eat.

S
sim3x, 2015-07-04
@sim3x

# text = '\n'.join(complete_log)
text = u'\n'.join(complete_log)

use the third python - it was invented so that such questions would no longer be asked

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question