sugarlabs / sugar

Sugar GTK shell
GNU General Public License v3.0
255 stars 242 forks source link

Language control panel fails to open with Sugar 0.118 #941

Closed aperezbios closed 3 years ago

aperezbios commented 3 years ago

On a nightly build of Fedora SoaS, with 0.118 for all packages, the Language control panel does not open, and the shell.log has a message stating "AttributeError: 'NoneType' object has no attribute 'needs_restart'"

aperezbios commented 3 years ago

File "/usr/lib/python3.9/site-packages/jarabe/controlpanel/gui.py", line 383, in __accept_clicked_cb if self._section_view.needs_restart: AttributeError: 'NoneType' object has no attribute 'needs_restart'

aperezbios commented 3 years ago

This is the Fedora nightly ISO I tested with, which is 1.06GB in size: https://www.dropbox.com/s/kdry595y0s7ae0a/Fedora-SoaS-Live-x86_64-Rawhide-20210208.n.0.iso?dl=0

quozl commented 3 years ago

Thanks. 7bbff9f59 ("Deepsource: unnecessary else or elif") was the most recent change, and was preceded by ea2cd9c7b ("Fix Gtk-WARNING in language control panel").

Each control panel is an extension that is imported with exceptions handled so that Sugar does not terminate when a buggy extension is added. When regressions occur in extensions, the cause is hidden. I suggest;

aperezbios commented 3 years ago

Thanks, Walter. I've applied this patch manually and confirmed that it fixes the problem. I'm able to successfully switch languages to Spanish, and then back to English.