If I using Mate Menu applet my panel, always me presents an Unbound Local Error exception

Bug #1575058 reported by Attila Hammer
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
mate-menu (Ubuntu)
Won't Fix
High
Unassigned

Bug Description

Dear Developers,

If I using Mate Menu applet, me always presents following traceback error message after login:
Unable to set the plugin system_management :
Traceback (most recent call last):

  File "/usr/lib/mate-menu/mate-menu.py", line 315, in PopulatePlugins
    MyPlugin.do_plugin()

  File "/usr/lib/python2.7/dist-packages/mate_menu/plugins/system_management.py", line 206, in do_plugin
    self.do_standard_items()

  File "/usr/lib/python2.7/dist-packages/mate_menu/plugins/system_management.py", line 154, in do_standard_items
    Button2.show()

UnboundLocalError: local variable 'Button2' referenced before assignment

If I this situation click OK button, Mate Menu applet me works fine, possible using the search bar, etc.
Please fix this error if this is possible.

Attila

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: mate-menu 5.7.1-1
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic i686
ApportVersion: 2.20.1-0ubuntu2
Architecture: i386
CurrentDesktop: MATE
Date: Tue Apr 26 10:52:55 2016
InstallationDate: Installed on 2016-04-22 (4 days ago)
InstallationMedia: Ubuntu-MATE 16.04 LTS "Xenial Xerus" - Release i386 (20160419.1)
PackageArchitecture: all
SourcePackage: mate-menu
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Attila Hammer (hammera) wrote :
Revision history for this message
Attila Hammer (hammera) wrote : Re: [Bug 1575058] [NEW] If I using Mate Menu applet my panel, always me presents an Unbound Local Error exception

I think I founded why happening this exception.
After installation, I removed the mate-welcome package. Because my
system not present following files, happened the reported exception:
/usr/bin/synaptic-pkexec, /usr/bin/software-center,
/usr/share/applications/ubuntu-mate-software.desktop
Real my machine not installed Synaptic, software-center or the
mate-welcome package, with ships the ubuntu-mate-software utility.
If I installing for example the synaptic package, the exception is not
happening.
Same result if I turning off the Show package manager related GSettings
preference the mate-plugin related, following the GSettings schema and name:
Schema name: org.mate.mate-menu.plugins.system_management
Setting name: show-package-manager
Default value: true

Following code part affected the exception related if one of the
examined packages not installed:
     def do_standard_items( self ):

         if ( self.showPackageManager == True ):
             if os.path.exists("/usr/bin/synaptic-pkexec"):
                 Button2 = easyButton("synaptic", self.iconsize,
[_("Package Manager")], -1, -1 )
                 Button2.connect( "clicked", self.ButtonClicked,
"/usr/bin/synaptic-pkexec" )
             elif os.path.exists("/usr/bin/software-center"):
                 Button2 = easyButton("softwarecenter", self.iconsize,
[_("Package Manager")], -1, -1 )
                 Button2.connect( "clicked", self.ButtonClicked,
"/usr/bin/software-center" )
             elif
os.path.exists("/usr/share/applications/ubuntu-mate-software.desktop"):
                 Button2 = easyButton("system-software-install",
self.iconsize, [_("Package Manager")], -1, -1 )
                 Button2.connect("clicked", self.ButtonClicked,
"/usr/bin/ubuntu-mate-welcome --software-only")
             Button2.show()
             self.systemBtnHolder.pack_start( Button2, False, False, 0 )
             self.mateMenuWin.setTooltip( Button2, _("Install, remove
and upgrade software packages") )

Attila

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mate-menu (Ubuntu):
status: New → Confirmed
Changed in mate-menu (Ubuntu):
importance: Undecided → High
Revision history for this message
Patrick Banholzer (patrick-banholzer) wrote :

I can confirm, that the workaround to uncheck the packagemanagement in the system tab eliminates this issue.

Nontheless it would be nice, if mate-menu would check if synaptic is there. And if there is no synaptic disable this checkbox.

Revision history for this message
UV (uvwild) wrote :
Download full text (8.3 KiB)

just for reference:
on a new installed ubuntu 16.04.3 LTS with mate desktop in feb 2018 this bug is still there!
Linux hostname 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

But there is a new version:
https://ubuntu-mate.org/blog/mate-desktop-116-for-xenial-xerus/
$ dpkg -l | grep mate
ii gir1.2-mate-panel 1.12.2-1 amd64 GObject introspection data for MATE panel
ii libmate-desktop-2-17:amd64 1.12.1-1 amd64 Library with common API for various MATE modules (library)
ii libmate-menu2:amd64 1.12.0-1 amd64 implementation of the freedesktop menu specification for MATE (library)
ii libmate-panel-applet-4-1 1.12.2-1 amd64 library for MATE Panel applets
ii libmate-slab0:amd64 1.12.1-2 amd64 beautification app library
ii libmate-window-settings1:amd64 1.12.1-2 amd64 utilities to configure the MATE desktop (window settings library)
ii libmatedict6 1.12.0-1 amd64 MATE desktop utilities (matedict library)
ii libmatekbd-common 1.12.1-1 all MATE library to manage keyboard configuration (common files)
ii libmatekbd4:amd64 1.12.1-1 amd64 MATE library to manage keyboard configuration
ii libmatemixer-common 1.12.1-1 all Mixer library for MATE Desktop (common files)
ii libmatemixer0:amd64 1.12.1-1 amd64 Mixer library for MATE Desktop
ii libmateweather-common 1.12.2-0ubuntu1 all MateWeather shared library (common files)
ii libmateweather1:amd64 1.12.2-0ubuntu1 amd64 MateWeather shared library
ii mate-applets 1.12.1-1 amd64 Various applets for the MATE panel
ii mate-applets-common 1.12.1-1 all Various applets for the MATE panel (common files)
ii mate-backgrounds 1.12.0-1 all Set of backgrounds packaged with the MATE Desktop Environment
ii mate-common 1.12.0-1 all common scripts and macros to develop with MATE
ii mate-control-center 1.12.1-2 amd64 utilities to configure the MATE desktop
ii mate-control-center-common 1.12.1-2 all utilities to con...

Read more...

Revision history for this message
Damodar Das (damodaranudas) wrote :

Same issue here, Ubuntu mate 16.04.4 LTS AMD64

Couldn't initialize plugin system_management : Traceback (most recent call last):

  File "/usr/lib/mate-menu/mate-menu.py", line 315, in PopulatePlugins
    MyPlugin.do_plugin()

  File "/usr/lib/python2.7/dist-packages/mate_menu/plugins/system_management.py", line 206, in do_plugin
    self.do_standard_items()

  File "/usr/lib/python2.7/dist-packages/mate_menu/plugins/system_management.py", line 154, in do_standard_items
    Button2.show()

UnboundLocalError: local variable 'Button2' referenced before assignment

Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Ubuntu MATE 16.04 is end of life and since that time MATE Menu has been ported to GTK3. We won't be revisiting this issue. Sorry.

Changed in mate-menu (Ubuntu):
status: Confirmed → Won't Fix
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.