conversion freezes when output folder name contains a '#' character
Bug #1594698 reported by
Thomas Zauner
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SoundConverter |
Fix Released
|
Critical
|
GautierPortet |
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.
Changed in soundconverter: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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 soundconverter/ python/ soundconverter/ ui.py", line 1369, in on_convert_ button_ clicked do_convert( ) soundconverter/ python/ soundconverter/ ui.py", line 1351, in do_convert converter. add(sound_ file) soundconverter/ python/ soundconverter/ gstreamer. py", line 695, in add unlink( output_ filename) soundconverter/ python/ soundconverter/ fileoperations. py", line 101, in vfs_unlink unlink( gnomevfs. URI(filename) ) IsDirectoryErro r: Is a directory
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/
self.
File "/usr/lib/
self.
File "/usr/lib/
vfs_
File "/usr/lib/
gnomevfs.
gnomevfs.
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.
gnomevfs. unlink( gnomevfs. URI('/home/ pi/Music/ #album123/ abc.mp3' ))
...becomes...
gnomevfs. unlink( '/home/ pi/Music/ '))
...which results in the IsDirectoryError.
I found this information here:
https:/ /developer. gnome.org/ gnome-vfs/ stable/ gnome-vfs- 2.0-gnome- vfs-uri. html#GNOME- VFS-URI- MAGIC-CHR: CAPS
Which states:
#define GNOME_VFS_ URI_MAGIC_ CHR '#'
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.