Open genodeftest opened 2 years ago
Please do not strip the output of spd-conf
, you can never know what will be important in the output, notably you should be getting:
Speech Dispatcher configuration tool
Do you want to setup a completely new configuration? [yes] :
>
Do you want to create/setup a 'user' or 'system' configuration? [user] :
>
User configuration created in /home/samy/.config/speech-dispatcher
That last line is what puts the default configuration in $HOME/.config/speech-dispatcher
, which I guess in your case fails for some reason. You could try to track what is happening in the create_user_configuration
function.
More than 2 years later in 2024, spd-conf
still does not work at all when an existing config does not exist.
This should be very, very easy to test:
rm -rf ~/.config/speech-dispatcher
spd-conf -n
My output:
tom@fedora ~> spd-conf -n
Speech Dispatcher configuration tool
Do you want to setup a completely new configuration? [yes] :
Do you want to create/setup a 'user' or 'system' configuration? [user] :
User configuration created in /home/tom/.config/speech-dispatcher
Configuring user settings for Speech Dispatcher
Default output module [espeak-ng] :
Default language (two/three-letter iso language code like "en" or "cs", possibly with a region qualification.) [en-US] :
Default audio output method [pulse] :
Default speech rate (on the scale of -100..100, 0 is default, 50 is faster, -50 is slower) [0] :
Default speech pitch (on the scale of -100..100, 0 is default, 50 is higher, -50 is lower) [0] :
Default speech pitch range (on the scale of -100..100, 0 is default, 50 is higher, -50 is lower) [0] :
Traceback (most recent call last):
File "/usr/bin/spd-conf", line 26, in <module>
sys.exit(speechd_config.main())
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/site-packages/speechd_config/config.py", line 841, in main
configure.complete_config()
File "/usr/lib64/python3.12/site-packages/speechd_config/config.py", line 754, in complete_config
self.configure_basic_settings(type='user')
File "/usr/lib64/python3.12/site-packages/speechd_config/config.py", line 673, in configure_basic_settings
self.options_substitute(configfile,
File "/usr/lib64/python3.12/site-packages/speechd_config/config.py", line 549, in options_substitute
for line in fileinput.input(configfile, inplace=True, backup=".bak"):
File "/usr/lib64/python3.12/fileinput.py", line 251, in __next__
line = self._readline()
^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/fileinput.py", line 337, in _readline
os.rename(self._filename, self._backupfilename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/tom/.config/speech-dispatcher/speechd.conf' -> '/home/tom/.config/speech-dispatcher/speechd.conf.bak'
@tgrushka :
More than 2 years later in 2024 [...] still does not work
contribution is very welcome to get things happen
Steps to reproduce
~/.config/speech-dispatcher
folderspd-conf
as user with any configuration (default values are fine)Obtained behavior
Instead of saving the file at the end, speech-dispatcher errors out:
Expected behavior
Save file at end of following configuration wizard
spd-conf
.Behavior information
(does not apply as this is not a bug in the speech-dispatcher daemon)
Distribution
Fedora 36
Version of Speech-dispatcher
Additional notes
I think (but I am not 100% sure) that this issue is the same as #649 which hasn't been fixed completely. That fix has landed in the 0.11.1 release (which I'm running) as far as I understand from the git history of 0.11 branch.
I think, the actual cause of the traceback is different: The file
~/.config/speech-dispatcher/speechd.conf
does not exist on a fresh installation or after deleting~/.config/speech-dispatcher
. Whenfileinput.input()
is called on that code, thefileinput
module relies on the existence of that file and tries to rename it usingos.rename()
(source code).If I understand the issue correctly, there should be some code creating¹ that file if it does not exist yet. That code should probably be placed at the beginning of
options_substitute
before callingfileinput.input()
.¹ or copying from the default config file. I don't know the code well enough to tell.