bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: midi2ly crashed with UnicodeDecodeError in convert_midi()


From: Francisco Vila
Subject: Re: midi2ly crashed with UnicodeDecodeError in convert_midi()
Date: Fri, 18 Mar 2011 18:57:31 +0100

2011/3/18 Jan Nieuwenhuizen <address@hidden>:
> Christian Fillion schreef op vr 18-03-2011 om 12:16 [-0400]:
>
>> Here a full report generated by Apport (on Ubuntu 10.10).
>> https://bugs.launchpad.net/ubuntu/+source/lilypond/+bug/714213
>
> Yes, I've seen that.  This should be fixed by my first patch,
> even.  I need the specifics to produce te crash with my
> second patch applied.

  my output from 'locale' is

LANG=es_ES.UTF-8
LANGUAGE=es_ES:en
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=

  'git show HEAD' tells

diff --git a/python/lilylib.py b/python/lilylib.py
index 3bf77f6..6fb96bb 100644
--- a/python/lilylib.py
+++ b/python/lilylib.py
(...)
# functions, and refuse them in some other places
 def display_encode (s):
-    return s.encode (sys.stderr.encoding or 'utf_8')
+    return s.encode (sys.stderr.encoding or 'utf-8', 'replace')

i.e. your second patch is applied.  Then I do

rm python/*.pyc
make -C python/
make
sudo make install

lilypond minué.ly

then

midi2ly minué.midi
LANG= midi2ly minué.midi
LANG=C midi2ly minué.midi
LANG=c midi2ly minué.midi
convert-ly minué.ly
LANG= convert-ly minué.ly
LANG=C convert-ly minué.ly
LANG=c convert-ly minué.ly

all fail with

$ midi2ly minué.midi
Traceback (most recent call last):
  File "/usr/local/bin/midi2ly", line 1207, in <module>
    main ()
  File "/usr/local/bin/midi2ly", line 1204, in main
    convert_midi (f, o)
  File "/usr/local/bin/midi2ly", line 1047, in convert_midi
    progress (_ ("%s output to `%s'...") % ('LY', out_file))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
4: ordinal not in range(128)


and


$ convert-ly minué.ly
convert-ly (GNU LilyPond) 2.13.55
Traceback (most recent call last):
  File "/usr/local/bin/convert-ly", line 369, in <module>
    main ()
  File "/usr/local/bin/convert-ly", line 356, in main
    do_one_file (f)
  File "/usr/local/bin/convert-ly", line 243, in do_one_file
    ly.stderr_write (_ ("Processing `%s\'... ") % infile_name)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
4: ordinal not in range(128)

respectively.
-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]