conversion freezes when output folder name contains a '#' character

Bug #1594698 reported by Thomas Zauner on 2016-06-21
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

The conversion (yet tested for mp3->mp3 and mp3->ogg) freezes at 'preparing conversion' when output folder name contains a '#' character.
Works fine when used with different output folder.

Richard Haynes (richhaynes) wrote :

I have this exact same issue. The simplest workaround is to remove all # characters from folders / filenames but it took alot of trial and error before I realised this was the cause.

The issue arises from gnomevfs reporting that the filename is a directory and refusing to proceed. This causes the UI to hang on 'Preparing conversion' but the error can be read from the command line:

SoundConverter 2.1.3
  using Gstreamer version: 0.10.36
  using 4 thread(s)
  using gio
  "faac" gstreamer element not found, disabling AAC output.
Queue start: 1 tasks, 4 thread(s).
Queue done in 0.019s (1 tasks)
Traceback (most recent call last):
  File "/usr/lib/soundconverter/python/soundconverter/", line 1369, in on_convert_button_clicked
  File "/usr/lib/soundconverter/python/soundconverter/", line 1351, in do_convert
  File "/usr/lib/soundconverter/python/soundconverter/", line 695, in add
  File "/usr/lib/soundconverter/python/soundconverter/", line 101, in vfs_unlink
gnomevfs.IsDirectoryError: Is a directory

File formats make no difference to this error. It is caused soley by having a hash ANYWHERE in the path or filename. This has been confirmed with repeated tests.

I know nothing about gnomevfs and nor do I want to! But what I did discover was that the # character has a special meaning in gnomevfs.URI and this causes the filename to become a path only i.e.




...which results in the IsDirectoryError.

I found this information here:

Which states:

The character used to divide location from extra "arguments" passed to the method.

From my above example, gnomevfs.URI('/home/pi/Music/#album123/abc.mp3') would split the path into an actual path of /home/pi/Music/ with argunments of album123/abc.mp3 which when passed to gnomevfs.unlink causes said error.

The only options I can think of would be to catch the error, stop preparation and warn the user to remove # from folder or filenames or to set GNOME_VFS_URI_MAGIC_CHR to something nobody will use (although im sure the new value would catch someone else out along the line).

I hope this information is helpful. I would consider patching this myself but I am new to Python and know nothing about gnomevfs so I wouldn't want to do something that may stop it working altogether.

Let me know if you need more information.

GautierPortet (kassoulet) wrote :

THe fix was already done for newer versions:

Thank you very much for your help.

GautierPortet (kassoulet) wrote :

My bad, this is another issue with quote/unquote.

The folder is stored unquoted in settings, and is quoted twice when used.


Changed in soundconverter:
importance: Undecided → Critical
assignee: nobody → GautierPortet (kassoulet)
milestone: none → 3.0.0-beta2
status: New → Fix Committed
Changed in soundconverter:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers