Steps to reproduce:
1. Check out SchoolTool trunk
2. Add schooltool.gradebook to buildout
3. Make and run an instance
4. Start the server
5. Stop the server
6. Remove schooltool.gradebook from buildout and run buildout
7. Start the server
And you'll get:
---------- %< ----------
Traceback (most recent call last):
File "bin/start-schooltool-instance", line 157, in <module>
schooltool.paste.run.main()
File "/home/replaceafill/.sandboxes/schooltool_docs/src/schooltool/paste/run.py", line 73, in main
paste.script.command.run(['serve', conf_file] + extra_options)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 84, in run
invoke(command, command_name, options, args[1:])
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 123, in invoke
exit_code = runner.run(args)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 218, in run
result = self.command()
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py", line 276, in command
relative_to=base, global_conf=vars)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py", line 313, in loadapp
**kw)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 204, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 225, in loadobj
return context.create()
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 625, in create
return self.object_type.invoke(self)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 110, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/util/fixtypeerror.py", line 57, in fix_call
val = callable(*args, **kw)
File "/home/replaceafill/.sandboxes/schooltool_docs/src/schooltool/paste/main.py", line 48, in schooltool_app_factory
os.path.join(global_conf['here'], config_file))
File "/home/replaceafill/.sandboxes/schooltool_docs/src/schooltool/paste/main.py", line 37, in __init__
db = self.setup(options)
File "/home/replaceafill/.sandboxes/schooltool_docs/src/schooltool/app/main.py", line 713, in setup
notify(DatabaseOpened(db))
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.event-3.5.0_1-py2.6.egg/zope/event/__init__.py", line 23, in notify
subscriber(event)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.component-3.9.5-py2.6.egg/zope/component/event.py", line 24, in dispatch
zope.component.subscribers(event, None)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.component-3.9.5-py2.6.egg/zope/component/_api.py", line 136, in subscribers
return sitemanager.subscribers(objects, interface)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.component-3.9.5-py2.6.egg/zope/component/registry.py", line 321, in subscribers
return self.adapters.subscribers(objects, provided)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.interface-3.6.1-py2.6-linux-x86_64.egg/zope/interface/adapter.py", line 585, in subscribers
subscription(*objects)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.app.appsetup-3.14.0-py2.6.egg/zope/app/appsetup/bootstrap.py", line 175, in bootStrapSubscriber
zope.event.notify(zope.processlifetime.DatabaseOpenedWithRoot(db))
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.event-3.5.0_1-py2.6.egg/zope/event/__init__.py", line 23, in notify
subscriber(event)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.component-3.9.5-py2.6.egg/zope/component/event.py", line 24, in dispatch
zope.component.subscribers(event, None)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.component-3.9.5-py2.6.egg/zope/component/_api.py", line 136, in subscribers
return sitemanager.subscribers(objects, interface)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.component-3.9.5-py2.6.egg/zope/component/registry.py", line 321, in subscribers
return self.adapters.subscribers(objects, provided)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.interface-3.6.1-py2.6-linux-x86_64.egg/zope/interface/adapter.py", line 585, in subscribers
subscription(*objects)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.app.appsetup-3.14.0-py2.6.egg/zope/app/appsetup/errorlog.py", line 35, in bootStrapSubscriber
RootErrorReportingUtility, copy_to_zlog=False)
File "/home/replaceafill/.sandboxes/schooltool_docs/eggs/zope.app.appsetup-3.14.0-py2.6.egg/zope/app/appsetup/bootstrap.py", line 77, in ensureUtility
if (reg.provided.isOrExtends(interface) and reg.name == name)]
AttributeError: type object 'ICustomScoreSystem' has no attribute 'isOrExtends'
make: *** [run] Error 1
---------- %< ----------
As far as I understand the problem is that on initialization the gradebook stores some score systems in the application site manager that are used like utilities. These should be stored in a separated container and registered in a different way. This needs to be confirmed.
I tested moving a Data.fs file from an instance of schooltool. gradebook to a schooltool-only instnace, and the server was able to start. I assume that moving the custom scoresystems out of the site manager had something to do with that. However, as soon as I visit localhost:7080 in the bowser, I get a number of exceptions:
aelkner@ ubuntu: ~/sandboxes/ scoresystems_ container/ schooltool$ make run schooltool- instance instance sandboxes/ scoresystems_ container/ schooltool/ instance/ schooltool. conf 127.0.0. 1:7080 aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/ZODB3- 3.9.7-py2. 6-linux- x86_64. egg/ZODB/ Connection. py", line 851, in setstate _setstate( obj) aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/ZODB3- 3.9.7-py2. 6-linux- x86_64. egg/ZODB/ Connection. py", line 919, in _setstate _reader. setGhostState( obj, p) aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/ZODB3- 3.9.7-py2. 6-linux- x86_64. egg/ZODB/ serialize. py", line 630, in setGhostState __setstate_ _(state) aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/zope. component- 3.9.5-py2. 6.egg/zope/ component/ persistentregis try.py" , line 40, in __setstate__ _createLookup( ) aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/zope. interface- 3.6.1-py2. 6-linux- x86_64. egg/zope/ interface/ adapter. py", line 91, in _createLookup s(self) aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/zope. interface- 3.6.1-py2. 6-linux- x86_64. egg/zope/ interface/ adapter. py", line 439, in __init__ init_extendors( ) aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/zope. interface- 3.6.1-py2. 6-linux- x86_64. egg/zope/ interface/ adapter. py", line 476, in init_extendors add_extendor( p) aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/zope. interface- 3.6.1-py2. 6-linux- x86_64. egg/zope/ interface/ adapter. py", line 480, in add_extendor stem' has no attribute '__iro__' aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/ZODB3- 3.9.7-py2. 6-linux- x86_64. egg/ZODB/ Connection. py", line 851, in setstate _setstate( obj) aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/ZODB3- 3.9.7-py2. 6-linux- x86_64. egg/ZODB/ Connection. py", line 919, in _setstate _reader. setGhostState( obj, p) aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/ZODB3- 3.9.7-py2. 6-linux- x86_64. egg/ZODB/ serialize. py", line 630, in setGhostState __setstate_ _(state) aelkner/ sandboxes/ scoresystems_ container/ schooltool/ eggs/zope. component- 3.9.5-py2. 6.egg/zope/ component/ persistentregis try.py" , line 40, in __setstate__ _createLookup( )
bin/start-
Reading configuration from /home/aelkner/
2011-04-27 01:00:08,311 main db: evolving in mode EVOLVEMINIMUM
Starting server in PID 17404.
serving on http://
2011-04-27 01:00:12,146 Couldn't load state for 0xa2
Traceback (most recent call last):
File "/home/
self.
File "/home/
self.
File "/home/
obj.
File "/home/
self.
File "/home/
self._v_lookup = self.LookupClas
File "/home/
self.
File "/home/
self.
File "/home/
for i in provided.__iro__:
AttributeError: type object 'ICustomScoreSy
2011-04-27 01:00:12,148 Couldn't load state for 0xa2
Traceback (most recent call last):
File "/home/
self.
File "/home/
self.
File "/home/
obj.
File "/home/
self.
Fil...