UnboundLocalError: local variable 'setEstablished' referenced before assignment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
orca (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
$ lsb_release -rd
Description: Ubuntu 19.10
Release: 19.10
$ apt-cache policy orca
orca:
Installed: 3.34.0-1ubuntu3
Candidate: 3.34.0-1ubuntu3
Version table:
*** 3.34.0-1ubuntu3 500
500 http://
500 http://
100 /var/lib/
When I run orca --setup, in the "Voice" tab, I change only the "Speech synthesizer" setting and click "Apply" or "OK", the settings should be saved. Instead I get an error:
$ orca --setup
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
keyBindings
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
elif appSpecific == False and setEstablished == True:
UnboundLocalError: local variable 'setEstablished' referenced before assignment
I traced the problem to /usr/lib/ python3/ dist-packages/ orca/backends/ gsettings_ backend. py. Variable setEstablished is not initialized:
def _saveVoiceSetti ngs(self, voiceSettings, profile, app=None):
appSpecifi c = True
appSpecifi c = False
if app is not None and app != '':
else:
for voice in ['default', 'uppercase', 'hyperlink', 'system']:
if appSpecific == True:
I think it should be initialized as follows:
def _saveVoiceSetti ngs(self, voiceSettings, profile, app=None):
appSpecifi c = True
appSpecifi c = False
if app is not None and app != '':
else:
for voice in ['default', 'uppercase', 'hyperlink', 'system']:
setEstabli shed = False
if appSpecific == True: