Public bug reported:

% gaphor
Application INFO initializing service service.component_registry
Traceback (most recent call last):
  File "/usr/bin/gaphor", line 9, in <module>
    load_entry_point('gaphor==0.17.0', 'console_scripts', 'gaphor')()
  File "/usr/lib/python2.7/dist-packages/gaphor/__init__.py", line 97, in main
    launch(model)
  File "/usr/lib/python2.7/dist-packages/gaphor/__init__.py", line 33, in launch
    Application.init()
  File "/usr/lib/python2.7/dist-packages/gaphor/application.py", line 52, in 
init
    self.init_all_services()
  File "/usr/lib/python2.7/dist-packages/gaphor/application.py", line 83, in 
init_all_services
    self.init_service(name)
  File "/usr/lib/python2.7/dist-packages/gaphor/application.py", line 99, in 
init_service
    srv.init(self)
  File "/usr/lib/python2.7/dist-packages/gaphor/services/componentregistry.py", 
line 30, in init
    self._components = component.registry.Components(
AttributeError: 'module' object has no attribute 'registry'

I found a fix (not tried myself) at http://www.christian-hoff.com/?p=62:

However, the fix is really, really simple:

diff --git a/gaphor/services/componentregistry.py 
b/gaphor/services/componentregistry.py
index 333c8e8..07ee5f0 100644
--- a/gaphor/services/componentregistry.py
+++ b/gaphor/services/componentregistry.py
@@ -7,6 +7,7 @@ unregister_handler, handle), a AdapterRegistry and a 
Subscription registry.
 """
 
 from zope import interface, component
+from zope.component import registry
 from gaphor.core import inject
 from gaphor.interfaces import IService, IEventFilter
 
@@ -27,7 +28,7 @@ class ZopeComponentRegistry(object):
         pass
 
     def init(self, app):
-        self._components = component.registry.Components(
+        self._components = registry.Components(
                                name='component_registry',
                                bases=(component.getGlobalSiteManager(),))

This follows the way the imports are defined in the zope.component docs.
Hope this helps!

UPDATE: I have submitted a pull request to Gaphor the Gaphor GIT tree
which got accepted today. The fix is not in 0.17.1, but any later
version should also have the fix preinstalled.

------------

% lsb_release -rd
Description:    Ubuntu 13.04
Release:        13.04

% apt-cache policy gaphor 
gaphor:
  Installed: (none)
  Candidate: 0.17.0-1
  Version table:
     0.17.0-1 0
        500 http://ubuntu.inode.at/ubuntu/ raring/universe amd64 Packages
        100 /var/lib/dpkg/status

** Affects: gaphor (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1191788

Title:
  gaphor will not start:  'module' object has no attribute 'registry'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gaphor/+bug/1191788/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to