Fails with unicode characters in filename

Bug #62528 reported by Christopher Barrington-Leigh
8
Affects Status Importance Assigned to Milestone
SoundConverter
Fix Released
Undecided
Unassigned
soundconverter (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: soundconverter

Under dapper, latest soundconverter gives "Invalid character in filename" and dies, just because there are some accented characters in the filename.

Even using "replace odd characters" in options doesn't help.

The program ought to have no trouble with unicode filenames.

Revision history for this message
Caroline Ford (secretlondon) wrote :

I get some breakage on dapper - no error message but no conversion either.

Which characters were you having problems with?

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

The first file it barfed on had a single e with acute accent (french music)

Worse -- I have now tried the program on a single file with no accents, and (separate bug!?) I get stderr output:

using encoder: vorbisenc (Ogg Vorbis encoder (deprecated))
Writing to: 'file:///home/cpbl/music/brigitte/dumas/le cours des jours/02 le cours des jours.ogg'

and the main window says "Conversion done, in 0 s", but no file is created!

This program does nothing for me...

Also, I do not see the relevance of the debbug 385181 to my original problem.

Changed in soundconverter:
status: Unknown → Fix Released
Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

That bug fix didn't help.

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

The Debian bug which is now fixed is NOT this problem.
 I have installed the fix for that bug, and this one still exists in the very latest version.

Revision history for this message
GautierPortet (kassoulet) wrote :

Hum, here I can use unicode filenames and tags...
can you please send at <kassoulet gmail com> one example file which don't work ?

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

I sent it.
By the way, if I "add file" and, rather than clicking through directories, I type the path (using tab completion) in the file selection dialog, I get an error dialog box:

Could not retrieve information about the file
error accessing 'file:///home/cpbl/music/brigitte/dumas/le%20cours%20des%20jours/01%20h%EF%BF%BDlium.wma': File not found

even though the file is obviously there: i got to the path by tab completion .

C

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

To be explicit: I am using:
SoundConverter 0.8.7

Revision history for this message
GautierPortet (kassoulet) wrote : Re: [Bug 62528] Re: Fails with unicode characters in filename

Hi,

On 9/27/06, Christopher Barrington-Leigh <email address hidden> wrote:
> I sent it.

I'm not able to reproduce the error.
I attach a new version that you can test if you want, hopefully you
will get better messages.
please send me the output of the program and/or screenshot of the error.

to install, unpack and run "sudo make install"

thank you for your help !

--
Gautier Portet <kassoulet gmail com>
  --==-- http://kassoulet.free.fr --==--

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

I am not seeing the attachment.
Thanks!
c

Revision history for this message
GautierPortet (kassoulet) wrote :

On 9/28/06, Christopher Barrington-Leigh <email address hidden> wrote:
> I am not seeing the attachment.
> Thanks!

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

[Gautier sent me a link, privately]

Behaviour fails on several levels. I can detail others separately, but if I select "single file" and give it the same one as before (by clicking through menus), the app does nothing, but says:

[1301][cpbl@:~/tmp/dl/soundconverter-0.8.8]$ ./soundconverter.py
SoundConverter 0.8.8
  Gstreamer version: 0.8.11, Python binding version: 0.8.3
locale charset: UTF-8
  using gnomevfssrc
Traceback (most recent call last):
  File "./soundconverter.py", line 426, in do_work
    if self.work():
  File "./soundconverter.py", line 500, in work
    self.tasks[0].finish()
  File "./soundconverter.py", line 629, in finish
    self.found_type_hook(self.sound_file, self.found_type)
  File "./soundconverter.py", line 931, in found_type
    self.append_file(sound_file)
  File "./soundconverter.py", line 1000, in append_file
    self.model.set(i, 0, self.format_cell(sound_file))
  File "./soundconverter.py", line 991, in format_cell
    error.show(_("Invalid character in filename:\n'%s'\n(%s)") % (s, e))
TypeError: show() takes exactly 3 arguments (2 given)

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Hey, want the music, too?
This is not the whole directory tree, but contains the examples above:
http://grad.econ.ubc.ca/cpbl/lptmp/

This is a temporary location; please destroy the music when the bug is fixed. :)

Revision history for this message
GautierPortet (kassoulet) wrote :

On 9/29/06, Christopher Barrington-Leigh <email address hidden> wrote:
> [Gautier sent me a link, privately]
>
> Behaviour fails on several levels. I can detail others separately, but
> if I select "single file" and give it the same one as before (by
> clicking through menus), the app does nothing, but says:
> TypeError: show() takes exactly 3 arguments (2 given)

oh I see, I've updated the file, hopefully it will get a nice error
message this time.

this is strange, since filenames are handled in unicode, and I'd
tested with kanji filenames...
maybe I misunderstood the whole gtk unicode handling...

--
Gautier Portet <kassoulet gmail com>
  --==-- http://kassoulet.free.fr --==--

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Gautier,
I am not sure whether you intended me to download a new version and carry on testing, but I have provided sets of music which seem to give a reproducible error here. I would point out that the functionality for me fails differently if I (1) select a file by typing its path, (2) select a directory containing a file with foreign characters. I have provided my directory structure in the .tar files.

Using your latest version, I got the following:

SoundConverter 0.8.8
  Gstreamer version: 0.8.11, Python binding version: 0.8.3
locale charset: UTF-8
  using gnomevfssrc
[0517][cpbl@:~/tmp/dl/soundconverter-0.8.8]$ Traceback (most recent call last):
  File "./soundconverter.py", line 426, in do_work
    if self.work():
  File "./soundconverter.py", line 500, in work
    self.tasks[0].finish()
  File "./soundconverter.py", line 629, in finish
    self.found_type_hook(self.sound_file, self.found_type)
  File "./soundconverter.py", line 931, in found_type
    self.append_file(sound_file)
  File "./soundconverter.py", line 1001, in append_file
    self.model.set(i, 0, self.format_cell(sound_file))
  File "./soundconverter.py", line 991, in format_cell
    sys.stderr.write(_("Invalid character in filename:\n'%s'\n(%s)") % (urllib.unquote(sound_file.get_uri()), e) )
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 62-64: invalid data

Revision history for this message
GautierPortet (kassoulet) wrote :

Hi,

On 9/30/06, Christopher Barrington-Leigh <email address hidden> wrote:
> Gautier,
> I am not sure whether you intended me to download a new version and carry on testing, but I have provided sets of music which seem to give a reproducible error here. I would point out that the functionality for me fails differently if I (1) select a file by typing its path, (2) select a directory containing a file with foreign characters. I have provided my directory structure in the .tar files.

I just wanted you to test a version with a better error message,
anyway, with the files you sent me, I can reproduce the error and thus
fix it, so thank you so much for your help.

This is in fact a file system error: the files on your system should
be in encoded utf-8, but these album filenames are encoded in
iso8859-1. In my system, the filenames appear with a "?" symbol on
every accented letter.

I think I know how to fix this, so expect a new version soon, I will
recontact you as soon as I release it.

And really thank you so much !

--
Gautier Portet <kassoulet gmail com>
  --==-- http://kassoulet.free.fr --==--

Revision history for this message
William Grant (wgrant) wrote :

This seems to be fixed in 0.9.2. Can you confirm, Gautier? If so, I'll attempt to get this into Edgy.

Revision history for this message
GautierPortet (kassoulet) wrote :

On 10/16/06, William Grant <email address hidden> wrote:
> This seems to be fixed in 0.9.2. Can you confirm, Gautier? If so, I'll
> attempt to get this into Edgy.

Yes, this should be fixed now.
I hope Christopher will confim...

--
Gautier Portet <kassoulet gmail com>
  --==-- http://kassoulet.free.fr --==--

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Thanks.
I couldn't find a .deb, so compiled it.
Great! It seems not to get upset at unicode characters anymore, unless the following error output is related:
(There do seem to be various other troubles so that I wouldn't list this as a releasable app. I might play with it more and make another bug report(s).)

SoundConverter 0.9.2
  using Gstreamer version: 0.10.6, Python binding version: 0.10.4
  using gnomevfssrc
Queue done in 0s
error:Could not determine type of stream. (balagane/thumbs.db)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: text/plain (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: text/plain (mail us if this is an error)
error:Could not determine type of stream. (dumas/le cours des jours/thumbs.db)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: text/plain (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
error:Could not determine type of stream. (daniel lavoie/live au divan vert/thumbs.db)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: text/plain (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: text/plain (mail us if this is an error)
Mime type skipped: text/plain (mail us if this is an error)
Mime type skipped: text/plain (mail us if this is an error)
error:Could not determine type of stream. (carla bruni/quelqu'un m'a dit/thumbs.db)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: text/plain (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Mime type skipped: image/jpeg (mail us if this is an error)
Traceback (most recent call last):
  File "/usr/local/bin/soundconverter", line 1241, in append_file_tags
    self.model.set(sound_file.model, 0, self.format_cell(sound_file))
  File "/usr/local/bin/soundconverter", line 1203, in format_cell
    params[item] = markup_escape(sound_file.get_tag(item))
  File "/usr/local/bin/soundconverter", line 223, in markup_escape
    str = "&amp;".join(str.split("&"))
AttributeError: 'list' object has no attribute 'split'
error:Could not determine type of stream. (bnabar/couche-tard et lve tt/desktop.ini)
error:Could not determine type of stream. (bnabar/desktop.ini)
Mime type skipped: text/plain (mail us if this is an error)
Mime type skipped: text/plain (mail us if this is an error)
Queue done in 22s
Queue done in 25s

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

recent version fixes this.

Changed in soundconverter:
status: Unconfirmed → Fix Committed
William Grant (wgrant)
Changed in soundconverter:
status: Fix Committed → Confirmed
status: Unconfirmed → Fix Released
importance: Undecided → Medium
Revision history for this message
Jim (jcounts18) wrote :

Crash report

I'm a newbie, so don't hurt me if i did something wrong by posting this ;)

Thanks much. I really enjoy Ubuntu GNU/Linux.

William Grant (wgrant)
Changed in soundconverter:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.