Ubuntu tweak 6.0 crash on start + workaround

Miguel Branco mig.jcb at gmail.com
Sat Jun 4 16:29:09 UTC 2011


I was finally trying out the 6.0 version of Ubuntu Tweak so I could
experiment with the plugin system and it wasn't loading, crashing with the
following trace:

Traceback (most recent call last):
  File "/usr/bin/ubuntu-tweak", line 62, in <module>
    window = UbuntuTweakWindow(feature=options.feature,
module=options.module)
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/app.py", line 261, in
__init__
    clip_page = ClipPage()
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/clips/__init__.py",
line 84, in __init__
    self.setup_rencently_used()
  File "/usr/lib/python2.7/dist-packages/ubuntutweak/clips/__init__.py",
line 129, in setup_rencently_used
    self.max_recently_used_size = max(size_list) + 58
ValueError: max() arg is an empty sequence

Following the beauty of open source, I edited the
file /usr/lib/python2.7/dist-packages/ubuntutweak/clips/__init__.py and
replaced that line:

    self.max_recently_used_size = max(size_list) + 58

with the following:

    if len(size_list) > 0:
        self.max_recently_used_size = max(size_list) + 58
    else:
        self.max_recently_used_size = 58

Please note that this is a simple workaround for people with the same
problem as mine, I haven't studied the code long enough to know if this is
the intented behavior or not, so I'm just posting it on the list to alert
everyone to the potential problem and offer a simple solution so we can
continue to toy around with the plugins :)

If this is a known bug or a problem of my setup please advise on how to
proceed!

Miguel Branco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-power-users/attachments/20110604/88d697ed/attachment.html>


More information about the Ubuntu-power-users mailing list