tags 312731 + patch pending thanks * Abel Daniel <[EMAIL PROTECTED]> [2005-06-09 23:42]: > According to line 198 in the file jack_config.py (installed in > /usr/lib/python2.3/site-packages) the default replacement character is a > percentage sign (%). This, however breaks the flac encoding, as the > percent_fkt for the flac encoder (in the file jack_helpers.py) depends on > the percentage sign to parse the status string returned by the flac encoder. > This, of course breaks when the filename has a % sign in it (as flac reports > the filename of the file being encoded): > > [EMAIL PROTECTED]:~/bulk/jack/Lajk Flix/7$ jack > File "/usr/lib/python2.3/site-packages/jack_main_loop.py", line 379, in > main_loop > exec(jack_helpers.helpers[i['prog']]['percent_fkt']) in globals(), tmp_d > File "<string>", line 8, in ? > ValueError: empty string for float() > *warning* abnormal exit > [EMAIL PROTECTED]:~/bulk/jack/Lajk Flix/7$
The fix is for the parsing routing to be more robust. Can you please test the patch below. It should make it work. The change to find() fixes your particular problem, the rest makes the parsing more robust because it is always possible that the filename contains ": ". diff -urN jack-3.1.1~/jack_helpers.py jack-3.1.1/jack_helpers.py --- jack-3.1.1~/jack_helpers.py 2005-06-19 23:07:23.931776104 +0100 +++ jack-3.1.1/jack_helpers.py 2005-06-19 23:08:03.155813144 +0100 @@ -216,9 +216,12 @@ if len (s) >= 2: s = s[-2] if len (s) == 1: s = s[0] y0 = string.find(s, ": ") -y1 = string.find (s, "%") +y1 = string.find (s, "%", y0) if y0 != -1 and y1 != -1: - percent = float(s[y0 + 1:y1]) + try: + percent = float(s[y0 + 1:y1]) + except ValueError: + percent = 0 else: percent = 0 """, -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]