Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make install doesn't work for Python 3.4.1 #57

Open
atilaneves opened this issue Jul 26, 2014 · 5 comments
Open

make install doesn't work for Python 3.4.1 #57

atilaneves opened this issue Jul 26, 2014 · 5 comments

Comments

@atilaneves
Copy link

# make install
python pppp -C ppppconfig.py Pymacs.py.in pppp.rst.in pymacs.el.in pymacs.rst.in contrib tests
Traceback (most recent call last):
  File "pppp", line 425, in <module>
    main(*sys.argv[1:])
  File "pppp", line 83, in main
    exec(compile(open(value).read(), value, 'exec'), self.context)
  File "ppppconfig.py", line 17, in <module>
    VERSION = get_version()
  File "ppppconfig.py", line 11, in get_version
    for line in open('setup.cfg'):
  File "/home/aalvesne/coding/python/virtualenv/tmp-5defa29666f51f4/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 0xc3 in position 53: ordinal not in range(128)
Makefile:26: recipe for target 'prepare' failed
make: *** [prepare] Error 1
@atilaneves
Copy link
Author

Nothing to do with Python 3 itself, it had to do with setting the LANG environment variable, which I learned from here.

@fd3kyt
Copy link

fd3kyt commented Aug 5, 2014

I had a similar problem on my Windows (Python3):

e:\Project\Python\github\Pymacs>make install
python pppp -C ppppconfig.py Pymacs.py.in pppp.rst.in pymacs.el.in pymacs.rst.in contrib tests
Traceback (most recent call last):
File "pppp", line 425, in
main(sys.argv[1:])
File "pppp", line 127, in main
self.transform_all_files(argument)
File "pppp", line 244, in transform_all_files
input, open(input), open(output, 'w').write)
File "pppp", line 330, in transform_file
self.each_substituded_line(lines)):
File "pppp", line 412, in each_substituded_line
for line in lines:
UnicodeDecodeError: 'gbk' codec can't decode byte 0x94 in position 119: illegal multibyte sequence
Makefile:26: recipe for target 'prepare' failed
make: *
* [prepare] Error 1

I solved this by adding encoding='utf8' to every open() in pppp

@shuweicn
Copy link

Thank you @fd3kyt

by the way
open(value, encoding='utf8')
open(output, 'w', encoding='utf8')

@atilaneves atilaneves reopened this Sep 7, 2015
@atilaneves
Copy link
Author

atilaneves commented Sep 7, 2015

On a current Arch Linux system installed today (September 7th 2015), the LANG environment variable no longer works. The only thing that did was editing pppp to add the encoding kwarg as indicated by @fd3kyt

@psachin
Copy link

psachin commented May 28, 2016

@fd3kyt

All the tests pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants