aldryn / aldryn-gallery

Gallery
Other
9 stars 12 forks source link

PluginAlreadyRegistered error #24

Closed Badestrand closed 8 years ago

Badestrand commented 8 years ago

Hi

I get the error PluginAlreadyRegistered: Cannot register <class 'aldryn_gallery.cms_plugins.GalleryCMSPlugin'>, a plugin with this name ('GalleryCMSPlugin') is already registered. and just can't find out why. I got it working on another system but here I get the error and am clueless. Any idea?

Here is the full traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
    return self.application(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 187, in __call__
    self.load_middleware()
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 47, in load_middleware
    mw_instance = mw_class()
  File "/usr/local/lib/python2.7/dist-packages/django/middleware/locale.py", line 24, in __init__
    for url_pattern in get_resolver(None).url_patterns:
  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 365, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 360, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/var/www/secret/website/urls.py", line 9, in <module>
    admin.autodiscover()
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py", line 29, in autodiscover
    import_module('%s.admin' % app)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/cms/admin/__init__.py", line 11, in <module>
    plugin_pool.plugin_pool.discover_plugins()
  File "/usr/local/lib/python2.7/dist-packages/cms/plugin_pool.py", line 36, in discover_plugins
    load('cms_plugins')
  File "/usr/local/lib/python2.7/dist-packages/cms/utils/django_load.py", line 56, in load
    get_module(app, modname, verbose, failfast)
  File "/usr/local/lib/python2.7/dist-packages/cms/utils/django_load.py", line 40, in get_module
    module = import_module(module_name)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/aldryn_gallery/cms_plugins.py", line 95, in <module>
    plugin_pool.register_plugin(GalleryCMSPlugin)
  File "/usr/local/lib/python2.7/dist-packages/cms/plugin_pool.py", line 93, in register_plugin
    "registered." % (plugin, plugin_name)
PluginAlreadyRegistered: Cannot register <class 'aldryn_gallery.cms_plugins.GalleryCMSPlugin'>, a plugin with this name ('GalleryCMSPlugin') is already registered.
Badestrand commented 8 years ago

I checked whether there are other modules named GalleryCMSPlugin by issuing a grep -r GalleryCMSPlugin * in /usr/local/lib/python2.7/dist-packages but there are only matches in aldryn_gallery

Badestrand commented 8 years ago

Alright, I played around a lot and it solved itself somehow... :)