Elisa doesn't start after upgrade on 0.5.20/21

Bug #306626 reported by loeppel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Moovida
Fix Released
Critical
Olivier Tilloy

Bug Description

loeppel@loeppel:~$ elisa
Launcher core version: 0.5.21
Current core version: 0.5.21
/usr/lib/python2.5/site-packages/elisa/core/utils/classinit.py:34: UserWarning: ClassInitMeta class is deprecated
  warn("ClassInitMeta class is deprecated")
Traceback (most recent call last):
  File "/usr/bin/elisa", line 8, in <module>
    load_entry_point('elisa==0.5.21', 'gui_scripts', 'elisa')()
  File "/usr/lib/python2.5/site-packages/elisa/core/launcher.py", line 363, in main
    Launcher().main(sys.argv)
  File "/usr/lib/python2.5/site-packages/elisa/core/launcher.py", line 71, in main
    return self.main_after_voodoo(argv)
  File "/usr/lib/python2.5/site-packages/elisa/core/launcher.py", line 202, in main_after_voodoo
    self.run_application()
  File "/usr/lib/python2.5/site-packages/elisa/core/launcher.py", line 335, in run_application
    application = Application(self.options)
  File "/usr/lib/python2.5/site-packages/elisa/core/application.py", line 276, in __init__
    super(Application, self).__init__(options, plugin_directories)
  File "/usr/lib/python2.5/site-packages/elisa/core/application.py", line 168, in __init__
    self.plugin_registry = self._create_plugin_registry(plugin_directories)
  File "/usr/lib/python2.5/site-packages/elisa/core/application.py", line 175, in _create_plugin_registry
    plugin_registry.load_plugins(disabled_plugins)
  File "/usr/lib/python2.5/site-packages/elisa/core/plugin_registry.py", line 333, in load_plugins
    self.load_plugin(dist)
  File "/usr/lib/python2.5/site-packages/elisa/core/plugin_registry.py", line 378, in load_plugin
    toplevel_directory = get_plugin_toplevel_directory(plugin)
  File "/usr/lib/python2.5/site-packages/elisa/core/plugin_registry.py", line 89, in get_plugin_toplevel_directory
    assert dist.project_name.startswith('elisa-plugin-')
AssertionError

Not very clean Ubuntu 8.04.1 Hardy, Fluendo-PPA Packages used.

Any suggestions? 0.5.19 and before worked just great.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Can you please run elisa with the following command in a terminal and attach here the output?

    ELISA_DEBUG=plugin_registry:5,*manager:5 elisa

Changed in elisa:
importance: Undecided → Critical
milestone: none → 0.5.x
Revision history for this message
Guillaume Desmottes (cassidy) wrote :

I have this problem on my Hardy box as well.

cassidy@cass-wks:~$ ELISA_DEBUG=plugin_registry:5,*manager:5 elisa
Launcher core version: 0.5.21
Current core version: 0.5.21
/usr/lib/python2.5/site-packages/elisa/core/utils/classinit.py:34: UserWarning: ClassInitMeta class is deprecated
  warn("ClassInitMeta class is deprecated")
Traceback (most recent call last):
  File "/usr/bin/elisa", line 8, in <module>
    load_entry_point('elisa==0.5.21', 'gui_scripts', 'elisa')()
  File "/usr/lib/python2.5/site-packages/elisa/core/launcher.py", line 363, in main
    Launcher().main(sys.argv)
  File "/usr/lib/python2.5/site-packages/elisa/core/launcher.py", line 71, in main
    return self.main_after_voodoo(argv)
  File "/usr/lib/python2.5/site-packages/elisa/core/launcher.py", line 202, in main_after_voodoo
    self.run_application()
  File "/usr/lib/python2.5/site-packages/elisa/core/launcher.py", line 335, in run_application
    application = Application(self.options)
  File "/usr/lib/python2.5/site-packages/elisa/core/application.py", line 276, in __init__
    super(Application, self).__init__(options, plugin_directories)
  File "/usr/lib/python2.5/site-packages/elisa/core/application.py", line 168, in __init__
    self.plugin_registry = self._create_plugin_registry(plugin_directories)
  File "/usr/lib/python2.5/site-packages/elisa/core/application.py", line 175, in _create_plugin_registry
    plugin_registry.load_plugins(disabled_plugins)
  File "/usr/lib/python2.5/site-packages/elisa/core/plugin_registry.py", line 333, in load_plugins
    self.load_plugin(dist)
  File "/usr/lib/python2.5/site-packages/elisa/core/plugin_registry.py", line 378, in load_plugin
    toplevel_directory = get_plugin_toplevel_directory(plugin)
  File "/usr/lib/python2.5/site-packages/elisa/core/plugin_registry.py", line 89, in get_plugin_toplevel_directory
    assert dist.project_name.startswith('elisa-plugin-')
AssertionError

Revision history for this message
Olivier Tilloy (osomon) wrote :

It seems that the plugin registry is trying to load an egg that is not an elisa plugin. We could patch the plugin registry to just skip such an egg instead of failing, but it remains interesting to understand what egg is causing this problem.

Can you please patch /usr/lib/python2.5/site-packages/elisa/core/plugin_registry.py and set a break point just before the assertion that fails and attach here information on the culprit dist?

Changed in elisa:
assignee: nobody → osomon
Revision history for this message
Guillaume Desmottes (cassidy) wrote :

I added a print dist.project_name before the assertion and the culprit seems to be "elisa-plugins-bad".

Changed in elisa:
milestone: 0.5.x → 0.5.22
Revision history for this message
Olivier Tilloy (osomon) wrote :

Interesting. I have no clue how you would end up with an elisa-plugins-bad egg. I'm going to need you to investigate a bit more to understand where that faulty distribution comes from.
Can you just slightly modify your print statement to print dist.__dict__ instead of dist.project_name and attach the output? That will give us more information on the distribution.

Changed in elisa:
status: New → In Progress
Revision history for this message
Guillaume Desmottes (cassidy) wrote :

{'project_name': 'elisa-plugins-bad', 'precedence': -1, '_key': 'elisa-plugins-bad', '_version': '0.3.4.rc2', 'platform': None, '_Distribution__dep_map': {None: []}, 'location': '/usr/lib/python2.5/site-packages', 'py_version': '2.5', '_parsed_version': ('00000000', '00000003', '00000004', '*c', '00000002', '*final'), '_provider': <pkg_resources.PathMetadata instance at 0x8c5456c>}

Olivier Tilloy (osomon)
Changed in elisa:
milestone: 0.5.22 → 0.5.23
Revision history for this message
Olivier Tilloy (osomon) wrote :

It looks like you have some leftovers from a very old version of Elisa (0.3.4rc2, dates back from February). The way we install plugin bundles has changed between 0.3.x and 0.5.x.

The easy and quick fix is to remove everything related to elisa in /usr/lib/python2.5/site-packages and then reinstall it from the PPA packages:

    $ sudo aptitude remove elisa
    $ sudo rm -rf /usr/lib/python2.5/site-packages/elisa*
    $ sudo aptitude install elisa

I'll write a patch that will make elisa less strict and instead of failing will just skip unknown plugins/bundles.

Revision history for this message
Guillaume Desmottes (cassidy) wrote :

Then something is wrong in Debian packages as these files should have been automatically removed.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Could it be that you manually installed them from the tarballs back in the days?

Revision history for this message
Guillaume Desmottes (cassidy) wrote :

Not that I remember. Which files shouldn't be there anymore? So I can look for the package providing them.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Files matching the following should definitely not be there any longer:

    /usr/lib/python2.5/site-packages/elisa-plugins-{good,bad,ugly}*

Revision history for this message
Guillaume Desmottes (cassidy) wrote :

Humm seems you were right. These files were not provided by any package. I removed them and things works fine now.

Anyway, this bug has to stay open until the assertion is fixed.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I submitted yesterday a merge request that fixes it (https://elisa.fluendo.com/quality/review/request/%<email address hidden>%3E), it should be fixed in Elisa 0.5.23.

Olivier Tilloy (osomon)
Changed in elisa:
status: In Progress → Fix Committed
Olivier Tilloy (osomon)
Changed in elisa:
status: Fix Committed → Fix Released
Olivier Tilloy (osomon)
tags: added: plugin-registry
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.