spacetelescope / stginga

Ginga products specific to STScI data analysis.
https://stginga.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6 stars 10 forks source link

Ginga cannot load stginga plugins #126

Closed pllim closed 7 years ago

pllim commented 7 years ago

@ejeschke , this no longer works. Does this have something to do with ejeschke/ginga#426? Please advise.

$ ginga --loglevel=40 --stderr --plugins=stginga.plugins.DQInspect
2017-02-24 14:08:17,126 | E | ModuleManager.py:72 (load_module) | Failed to load module 'DQInspect': No module named 'stginga.plugins.DQInspect'
2017-02-24 14:08:17,127 | E | Control.py:294 (add_local_plugin) | Unable to load local plugin 'DQInspect': No module named 'stginga.plugins.DQInspect'
2017-02-24 14:08:17,246 | E | PluginManager.py:70 (load_plugin) | Failed to load plugin 'DQInspect': 'DQInspect'
2017-02-24 14:08:17,249 | E | PluginManager.py:74 (load_plugin) | Traceback:
  File ".../ginga/gw/PluginManager.py", line 43, in load_plugin
    module = self.mm.get_module(spec.module)

  File ".../ginga/misc/ModuleManager.py", line 77, in get_module
    return self.module[module_name]

Calling stginga directly gives similar traceback.

ejeschke commented 7 years ago

I don't think it should have anything to do with that PR because it simply added an additional way to load plugins. In other words, I didn't change the existing ways that plugins can be loaded.

I'll give it a try and report my results.

ejeschke commented 7 years ago

I think the ModuleManager did get an update recently, having to do with python 3 compatibility.

Do you get the same result with python 2.7?

pllim commented 7 years ago

Oh, dear. I have not touched Python 2.7 in a while... :sweat_smile: Let me see if I remember where it is...

pllim commented 7 years ago

On Python 2.7 using latest dev of both:

$ ginga --loglevel=40 --stderr --plugins=stginga.plugins.DQInspect
No handlers could be found for logger "ImageViewBase"
2017-02-24 14:45:36,832 | E | ModuleManager.py:72 (load_module) | Failed to load module 'DQInspect': No module named stginga.plugins.DQInspect
2017-02-24 14:45:36,833 | E | Control.py:294 (add_local_plugin) | Unable to load local plugin 'DQInspect': No module named stginga.plugins.DQInspect
2017-02-24 14:45:36,937 | E | PluginManager.py:70 (load_plugin) | Failed to load plugin 'DQInspect': 'DQInspect'
2017-02-24 14:45:36,938 | E | PluginManager.py:74 (load_plugin) | Traceback:
  File ".../python2.7/site-packages/ginga-2.6.3.dev1356-py2.7.egg/ginga/gw/PluginManager.py", line 43, in load_plugin
    module = self.mm.get_module(spec.module)

  File ".../python2.7/site-packages/ginga-2.6.3.dev1356-py2.7.egg/ginga/misc/ModuleManager.py", line 77, in get_module
    return self.module[module_name]
ejeschke commented 7 years ago

@pllim, can you try commit ejeschke/ginga@48348a8d57aa7bbd5aded5a13fd771f36906fd89 ? I think this may fix the issue.

ejeschke commented 7 years ago

It was due to the ModuleManager update.

pllim commented 7 years ago

Thanks for the quick fix, @ejeschke !