Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#6988 closed defect (fixed)

Plugin update don't work

Reported by: x11term Owned by:
Priority: normal Milestone: 0.15
Component: plugins Version: hg
Severity: normal Keywords:
Cc: Blocked By:
Blocking: OS: All

Description

Bug description

I tried to update the plugins via Plugin Installer could not.

Chatstate in roster: current 0.4, new 0.5.

Log from console:

Traceback (most recent call last):
  File "../plugins/plugin_installer/plugin_installer.py", line 202, in on_plugin_downloaded
    gajim.plugin_manager.add_plugin(plugins[0])
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/pluginmanager.py", line 128, in add_plugin
    plugin = plugin_class()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 107, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 154, in __init__
    self.load_config()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 107, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 164, in load_config
    self.config.load()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 235, in load
    self.data = shelve.open(self.FILE_PATH)
  File "/usr/lib64/python2.7/shelve.py", line 239, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib64/python2.7/shelve.py", line 223, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "/usr/lib64/python2.7/anydbm.py", line 85, in open
    return mod.open(file, flag, mode)
gdbm.error: (11, '\xd0\xa0\xd0\xb5\xd1\x81\xd1\x83\xd1\x80\xd1\x81 \xd0\xb2\xd1\x80\xd0\xb5\xd0\xbc\xd0\xb5\xd0\xbd\xd0\xbd\xd0\xbe \xd0\xbd\xd0\xb5\xd0\xb4\xd0\xbe\xd1\x81\xd1\x82\xd1\x83\xd0\xbf\xd0\xb5\xd0\xbd')

Steps to reproduce

Set checkbox Install/Upgrade? and press button.

Software versions

OS version: gentoo linux
GTK version: 2.24.6
PyGTK version: 2.24.0

Attachments (2)

gajim.vc.diff (957 bytes) - added by Dicson 5 years ago.
gajim.png (43.9 KB) - added by x11term 5 years ago.
Sometimes the list of available plugins, it looks so

Download all attachments as: .zip

Change History (17)

comment:1 Changed 5 years ago by x11term

After restarting, gajim, version "chatstate in roster" was 0.5. Probably does not display version in "plugin installer" after the upgrade.

comment:2 Changed 5 years ago by Dicson

Can you repro? Maybe we need close() db befor open it again? Patch attached

Changed 5 years ago by Dicson

comment:3 Changed 5 years ago by x11term

applied the patch gajim.vc.diff

rm -rf chatstate plugin

remove ~/.config/gajim/pluginsconfig/chatstate

gajim not started

Traceback (most recent call last):
  File "gajim.py", line 445, in <module>
    interface.run()
  File "/home/users/staff/terminator/soft/gajim/src/gui_interface.py", line 2512, in run
    gajim.plugin_manager = plugins.PluginManager()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 129, in __call__
    cls.instance=super(Singleton, cls).__call__(*args,**kw)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/pluginmanager.py", line 105, in __init__
    self.add_plugins(pc)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/pluginmanager.py", line 144, in add_plugins
    self.add_plugin(plugin_class)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/pluginmanager.py", line 128, in add_plugin
    plugin = plugin_class()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 107, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 154, in __init__
    self.load_config()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 107, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 164, in load_config
    self.config.load()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 235, in load
    self.data = shelve.open(self.FILE_PATH)
  File "/usr/lib64/python2.7/shelve.py", line 239, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib64/python2.7/shelve.py", line 223, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "/usr/lib64/python2.7/anydbm.py", line 82, in open
    raise error, "db type could not be determined"
anydbm.error: db type could not be determined

comment:4 follow-up: Changed 5 years ago by x11term

add in plugins.py

        print("Test ")
        print(self.FILE_PATH)

log:

Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/length_notifier
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/events_dump
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/new_events_example
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/google_translation
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/snarl_notifications
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/roster_buttons
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/plugin_installer
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/acronyms_expander
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/whiteboard
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/dbus
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/triggers
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/banner_tweaks
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/url_image_preview
Traceback (most recent call last):
  File "gajim.py", line 445, in <module>
    interface.run()
  File "/home/users/staff/terminator/soft/gajim/src/gui_interface.py", line 2512, in run
    gajim.plugin_manager = plugins.PluginManager()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 129, in __call__
    cls.instance=super(Singleton, cls).__call__(*args,**kw)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/pluginmanager.py", line 105, in __init__
    self.add_plugins(pc)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/pluginmanager.py", line 144, in add_plugins
    self.add_plugin(plugin_class)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/pluginmanager.py", line 128, in add_plugin
    plugin = plugin_class()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 107, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 154, in __init__
    self.load_config()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 107, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 164, in load_config
    self.config.load()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 237, in load
    self.data = shelve.open(self.FILE_PATH)
  File "/usr/lib64/python2.7/shelve.py", line 239, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib64/python2.7/shelve.py", line 223, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "/usr/lib64/python2.7/anydbm.py", line 82, in open
    raise error, "db type could not be determined"
anydbm.error: db type could not be determined

comment:5 in reply to: ↑ 4 ; follow-up: Changed 5 years ago by Dicson

Replying to x11term:

add in plugins.py

        print("Test ")
        print(self.FILE_PATH)

line num?

comment:6 in reply to: ↑ 5 Changed 5 years ago by x11term

Replying to Dicson:

line num?

235

comment:7 Changed 5 years ago by x11term

gajim started after remove: ~/.config/gajim/pluginsconfig/url_image_preview

Plugins Installer shows that you have installed version 0.4 chatstate. Directory with the files chatstate "recovered". After the upgrade, re-opens the list of available plugins, and it shows that chatstate not installed.

gajim log after close:

Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/length_notifier
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/events_dump
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/new_events_example
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/google_translation
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/snarl_notifications
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/roster_buttons
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/plugin_installer
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/acronyms_expander
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/whiteboard
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/dbus
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/triggers
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/banner_tweaks
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/url_image_preview
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/image
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/flashing_keyboard
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/clickable_nicknames
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/Wrong Layout
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/plugins_translations
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/chatstate
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/Juick
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/clients_icons
/home/users/staff/terminator/.local/share/gajim/plugins/clients_icons/clients_icons.py:170: Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
  if roster.model[child_iters[0]][self.renderer_num] is None:
Test 
/home/users/staff/terminator/.config/gajim/pluginsconfig/chatstate
Traceback (most recent call last):
  File "../plugins/plugin_installer/plugin_installer.py", line 203, in on_plugin_downloaded
    gajim.plugin_manager.add_plugin(plugins[0])
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/pluginmanager.py", line 128, in add_plugin
    plugin = plugin_class()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 107, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 154, in __init__
    self.load_config()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 107, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 164, in load_config
    self.config.load()
  File "/home/users/staff/terminator/soft/gajim/src/plugins/helpers.py", line 114, in wrapper
    result = f(*args, **kwargs)
  File "/home/users/staff/terminator/soft/gajim/src/plugins/plugin.py", line 237, in load
    self.data = shelve.open(self.FILE_PATH)
  File "/usr/lib64/python2.7/shelve.py", line 239, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib64/python2.7/shelve.py", line 223, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "/usr/lib64/python2.7/anydbm.py", line 82, in open
    raise error, "db type could not be determined"
anydbm.error: db type could not be determined

and gajim wont start with same error url_image_preview.

Gajim has started only after the removal of the. Config / ... chatstate and url_image_preview.

Just close gajim and start again. Not start with same error.

Remove all files from ~/.config/...

Start, close, start again and same error.

Changed 5 years ago by x11term

Sometimes the list of available plugins, it looks so

comment:8 Changed 5 years ago by Dicson

shelve in gentoo create db file and do not open it later. We try close() db on gajim exits. It is not helps. http://www.gossamer-threads.com/lists/python/python/13891

Last edited 5 years ago by Dicson (previous) (diff)

comment:9 Changed 5 years ago by x11term

rebuild python with berkdb use flag. Gajim start without errors.

comment:10 Changed 5 years ago by x11term

  • Resolution set to invalid
  • Status changed from new to closed

plugins installer now work.

The behavior of #comment:8 still remained.

comment:11 follow-up: Changed 5 years ago by asterix

indeed gentoo removed bsddb from it's python version. So databases created before that cannot be read anymore. bsddb is not in py3, so we'll also have the problem at this moment ...

I could look at converting bsddb to gdbm before we switch to py3, BUT ... gdbm is not available under windows. Only dumbdb is, which is not a very good db. So one more swith if os.name == 'nt'??

comment:12 Changed 5 years ago by x11term

Maybe all in sqlite?

comment:13 in reply to: ↑ 11 Changed 5 years ago by x11term

Replying to [asterix]:

http://www.lagaule.org/plugin.patch if you still have your old plugins config file, they should now be backed up to .bak and a new one should be created

Asterix, work. But http://pastebin.com/vVLkXXch after plugins->triggers->config. I started with a blank directory pluginsconfig.

Last edited 5 years ago by x11term (previous) (diff)

comment:14 Changed 5 years ago by Yann Leboulanger <asterix@…>

  • Milestone set to 0.15
  • Resolution changed from invalid to fixed

(In [5fd419ea860d]) stop using shelve, it cannot work when upgrading python version. Fixes #6988

comment:15 Changed 5 years ago by Yann Leboulanger <asterix@…>

(In [410a7f1ea00b]) stop using shelve, it cannot work when upgrading python version. Fixes #6988

Note: See TracTickets for help on using tickets.