Fails with "ValueError: your selected folder should be in URI format."

Bug #1934517 reported by PQCraft
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SoundConverter
Fix Released
High
sezanzeb

Bug Description

This will not happen under root but its quite annoying to have to run everything as root and then have to run chown on the files. The application will fail with this text:
```
[pqcraft@ArchBTW]:~$ soundconverter
Gtk-Message: 09:34:27.286: Failed to load module "appmenu-gtk-module"
soundconverter 4.0.1
Traceback (most recent call last):
  File "/usr/bin/soundconverter", line 241, in <module>
    gui_main(NAME, VERSION, GLADEFILE, files)
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 1450, in gui_main
    window = SoundConverterWindow(builder)
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 998, in __init__
    self.prefs = PreferencesDialog(builder, self.widget)
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 545, in __init__
    self.set_widget_initial_values()
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 638, in set_widget_initial_values
    self.change_mime_type(current_mime_type)
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 853, in change_mime_type
    self.update_example()
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 735, in update_example
    generator = TargetNameGenerator()
  File "/usr/lib/python3.9/site-packages/soundconverter/util/namegenerator.py", line 175, in __init__
    raise ValueError(
ValueError: your selected folder should be in URI format.
```

It ran the first time after I installed it, I opened it, set it up to export .wav 22khz with the format '{Total}' and it hung (I assume {Total} did not contain anything therefore it was attempting to write to an invalid file name). I closed it and it would not open again, so I opened it in the terminal and all this was printed out.

--debug output:
```
[pqcraft@PQC-Asus]:~$ soundconverter --debug
Gtk-Message: 09:43:48.323: Failed to load module "appmenu-gtk-module"
INFO: soundconverter, line 237, soundconverter 4.0.1
Traceback (most recent call last):
  File "/usr/bin/soundconverter", line 241, in <module>
    gui_main(NAME, VERSION, GLADEFILE, files)
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 1450, in gui_main
    window = SoundConverterWindow(builder)
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 998, in __init__
    self.prefs = PreferencesDialog(builder, self.widget)
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 545, in __init__
    self.set_widget_initial_values()
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 638, in set_widget_initial_values
    self.change_mime_type(current_mime_type)
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 853, in change_mime_type
    self.update_example()
  File "/usr/lib/python3.9/site-packages/soundconverter/interface/ui.py", line 735, in update_example
    generator = TargetNameGenerator()
  File "/usr/lib/python3.9/site-packages/soundconverter/util/namegenerator.py", line 175, in __init__
    raise ValueError(
ValueError: your selected folder should be in URI format.
```

Revision history for this message
PQCraft (pqcraft) wrote :

BTW, the two hostnames were not two different computers, I was just messing around with the hostname lol

Revision history for this message
PQCraft (pqcraft) wrote :

And, to add to this, apparently under root it doesn't save the settings and ignores them when converting. I set it up to convert to wav 22khz and it still converted it to .ogg.

sezanzeb (sezanzeb)
Changed in soundconverter:
assignee: nobody → sezanzeb (sezanzeb)
Revision history for this message
sezanzeb (sezanzeb) wrote :

Thanks for taking your time to report this bug!

https://github.com/kassoulet/soundconverter/pull/53 should prevent soundconverter from crashing because the example is displayed, but I think it might still crash when clicking the convert button.

The "ValueError: your selected folder should be in URI format." error message is missing something, did you remove the path from it?

Changed in soundconverter:
milestone: none → 4.0.2
Revision history for this message
PQCraft (pqcraft) wrote :

@sezanzeb I did not modify the code in any way, this is what happened directly after running `pacman -S soundconverter`.

Revision history for this message
sezanzeb (sezanzeb) wrote :

Ah thanks, valuable information.

Unfortunately the AUR soundconverter-git package is out of date, but if you don't mind having to uninstall the soundconverter files manually (or to use pacmans --overwrite option when installing next time) you can try to get the first attempt for a fix from https://github.com/kassoulet/soundconverter#building-and-installation

Revision history for this message
PQCraft (pqcraft) wrote :

@sezanzeb it works after a manual install from the git, thanks :)

Changed in soundconverter:
status: New → Fix Released
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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