[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Persistent error on 'make': [Python] ordinal not in range(128)
From: |
Francisco Vila |
Subject: |
Re: Persistent error on 'make': [Python] ordinal not in range(128) |
Date: |
Wed, 16 Mar 2011 08:23:38 +0100 |
2011/3/15 Francisco Vila <address@hidden>:
> Hello. This happens on _fresh_ repositories in one of my systems.
> Clues suggest that my python installation is misconfigured.
>
> make[1]: Entering directory `/home/fravd/source/lilypond/Documentation'
> LILYPOND_VERSION=2.13.54 /usr/bin/python ../scripts/lilypond-book.py
> -I ./ (...) usage.tely
> ...
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in
> position 24: ordinal not in range(128)
>
> So lilypond-book has problems with usage.tely. I have seen this
> problem sometimes exposed in users list, also related to
> lilypond-book, and a solution is never given. If somebody has any
> ideas, I'll thank to hear them.
Well, I don't understand why it works, but I have completed 'make' and
'make doc' only after this change:
diff --git a/python/lilylib.py b/python/lilylib.py
index 3bf77f6..4be48e7 100644
--- a/python/lilylib.py
+++ b/python/lilylib.py
@@ -48,7 +48,7 @@ underscore = _
# Maybe guess encoding from LANG/LC_ALL/LC_CTYPE?
def encoded_write(f, s):
- f.write (s.encode (f.encoding or 'utf_8'))
+ f.write (s.encode ('utf_8'))
# ugh, Python 2.5 optparse requires Unicode strings in some argument
# functions, and refuse them in some other places
--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com
- Persistent error on 'make': [Python] ordinal not in range(128), Francisco Vila, 2011/03/15
- Re: Persistent error on 'make': [Python] ordinal not in range(128),
Francisco Vila <=
- Re: Persistent error on 'make': [Python] ordinal not in range(128), Dmytro O. Redchuk, 2011/03/16
- Re: Persistent error on 'make': [Python] ordinal not in range(128), Graham Percival, 2011/03/17
- Re: Persistent error on 'make': [Python] ordinal not in range(128), Francisco Vila, 2011/03/17
- Re: Persistent error on 'make': [Python] ordinal not in range(128), Graham Percival, 2011/03/17
- Re: Persistent error on 'make': [Python] ordinal not in range(128), Jan Nieuwenhuizen, 2011/03/17
- Re: Persistent error on 'make': [Python] ordinal not in range(128), Francisco Vila, 2011/03/18
- Re: Persistent error on 'make': [Python] ordinal not in range(128), Francisco Vila, 2011/03/18
- Re: Persistent error on 'make': [Python] ordinal not in range(128), Graham Percival, 2011/03/18