Schooltool doesn't start after upgrade to 12.04

Bug #995615 reported by Ikpeer on 2012-05-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool Gradebook
Critical
Gediminas Paulauskas

Bug Description

After the upgrade of the distribution to Ubuntu 12.04 Precise Pangolin schooltool doesn't start up anymore. The error.log says:

-------------
2012-05-06 21:10:03,609 main db: evolving in mode EVOLVEMINIMUM
2012-05-06 21:10:03,610 main db/schooltool.requirement: running install generation
2012-05-06 21:10:03,709 main db/schooltool.requirement: failed to run install
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zope/app/generations/generations.py", line 450, in evolve
    manager.install(context)
  File "/usr/lib/python2.7/dist-packages/zope/app/generations/generations.py", line 160, in install
    evolver.evolve(context)
  File "/usr/lib/python2.7/dist-packages/schooltool/requirement/generations/install.py", line 30, in evolve
    evolve1.evolve(context)
  File "/usr/lib/python2.7/dist-packages/schooltool/requirement/generations/evolve1.py", line 69, in evolve
    removeUtils(site_manager, ICustomScoreSystem)
  File "/usr/lib/python2.7/dist-packages/schooltool/requirement/generations/evolve1.py", line 48, in removeUtils
    assert n_provided == len(utilities)
AssertionError
--------------------

I've had an Assertion Error earlier, when I upgraded to 11.10 last fall. The solution then was to use an older package of schooltool-gradebook. But this doesn't work anymore. (After all it was not planned as a permanent solution.)

It seems as if my database refuses to get evolved. It was originally created with schooltool-2009.

I attach the paste.log which is more precise.

Ikpeer (ikpeer) wrote :
Ikpeer (ikpeer) wrote :
Download full text (4.0 KiB)

While playing around I cannot reproduce the assertion error. By the way: How can I determine, which generation my database has?

Instead I get an Attribute Error. This is what paste.log says:

-----------------
Konfiguration von /etc/schooltool/standard/schooltool.conf einlesen
INFO:zope.app.generations:main db: evolving in mode EVOLVEMINIMUM
Traceback (most recent call last):
  File "/usr/bin/paster", line 4, in <module>
    command.run()
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 238, in run
    result = self.command()
  File "/usr/lib/python2.7/dist-packages/paste/script/serve.py", line 284, in command
    relative_to=base, global_conf=vars)
  File "/usr/lib/python2.7/dist-packages/paste/script/serve.py", line 321, in loadapp
    **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/schooltool/paste/main.py", line 48, in schooltool_app_factory
    os.path.join(global_conf['here'], config_file))
  File "/usr/lib/python2.7/dist-packages/schooltool/paste/main.py", line 37, in __init__
    db = self.setup(options)
  File "/usr/lib/python2.7/dist-packages/schooltool/app/main.py", line 679, in setup
    notify(DatabaseOpened(db))
  File "/usr/lib/python2.7/dist-packages/zope/event/__init__.py", line 31, in notify
    subscriber(event)
  File "/usr/lib/python2.7/dist-packages/zope/component/event.py", line 24, in dispatch
    zope.component.subscribers(event, None)
  File "/usr/lib/python2.7/dist-packages/zope/component/_api.py", line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/usr/lib/python2.7/dist-packages/zope/component/registry.py", line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/usr/lib/python2.7/dist-packages/zope/interface/adapter.py", line 585, in subscribers
    subscription(*objects)
  File "/usr/lib/python2.7/dist-packages/zope/app/appsetup/bootstrap.py", line 175, in bootStrapSubscriber
    zope.event.notify(zope.processlifetime.DatabaseOpenedWithRoot(db))
  File "/usr/lib/python2.7/dist-packages/zope/event/__init__.py", line 31, in notify
    subscriber(event)
  File "/usr/lib/python2.7/dist-packages/zope/component/event.py", line 24, in dispatch
    zope.component.subscribers(event, None)
  File "/usr/lib/python2.7/dist-pack...

Read more...

Gediminas Paulauskas (menesis) wrote :

You can see what generations the database has at http://localhost:7080/control/generations.html

And the last error means that gradebook plugin is not available. But schooltool starts I think?

This error is being fixed by schooltool.requirement generation 1 but that fails as seen by your first error. I think it was reported already :(

affects: schooltool → schooltool.gradebook
Changed in schooltool.gradebook:
importance: Undecided → Critical
Gediminas Paulauskas (menesis) wrote :

I think you can edit /usr/lib/python2.7/dist-packages/schooltool/requirement/generations/evolve1.py and remove the line 48 (assert). The evolution will then succeed.

Ikpeer (ikpeer) wrote :
Download full text (5.4 KiB)

The server starts without problems when I remove my database.

After this I removed the schooltool packages and reinstalled them again. Then I stopped the server and replaced the new database with my original.

The server fails again with the assertion error. "paste.log" says:

----------------
Konfiguration von /etc/schooltool/standard/schooltool.conf einlesen
INFO:zope.app.generations:main db: evolving in mode EVOLVEMINIMUM
INFO:zope.app.generations:main db/schooltool.requirement: running install generation
ERROR:zope.app.generations:main db/schooltool.requirement: failed to run install
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zope/app/generations/generations.py", line 450, in evolve
    manager.install(context)
  File "/usr/lib/python2.7/dist-packages/zope/app/generations/generations.py", line 160, in install
    evolver.evolve(context)
  File "/usr/lib/python2.7/dist-packages/schooltool/requirement/generations/install.py", line 30, in evolve
    evolve1.evolve(context)
  File "/usr/lib/python2.7/dist-packages/schooltool/requirement/generations/evolve1.py", line 69, in evolve
    removeUtils(site_manager, ICustomScoreSystem)
  File "/usr/lib/python2.7/dist-packages/schooltool/requirement/generations/evolve1.py", line 48, in removeUtils
    assert n_provided == len(utilities)
AssertionError
Traceback (most recent call last):
  File "/usr/bin/paster", line 4, in <module>
    command.run()
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 238, in run
    result = self.command()
  File "/usr/lib/python2.7/dist-packages/paste/script/serve.py", line 284, in command
    relative_to=base, global_conf=vars)
  File "/usr/lib/python2.7/dist-packages/paste/script/serve.py", line 321, in loadapp
    **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/schooltool/paste/main.py", line 48, in schooltool_app_factory
    os.path.join(global_conf['here'], config_file))
  File "/usr/lib/python2.7/dist-packages/schooltool/paste/main.py", line 37, in __init__
    db = self.setup(options)
  File "/usr/lib/python2.7/dist-packages/schooltool/app/main.py", line 679, in setup
    notify(DatabaseOpened(db))
  File "/usr/lib/python2.7/dist-packages/zope/event/__init__.py", line 31, in notify
    subscriber(event)
...

Read more...

It has worked!!! Thank you very much! My database is up and running!

Since my old database is now evolved I hope future updates will work as
expected.

Thanks again and best regards! Keep on with this software!

Andrej Keiper
Germany

Am Sonntag, 6. Mai 2012, 20:38:34 schrieben Sie:
> I think you can edit /usr/lib/python2.7/dist-
> packages/schooltool/requirement/generations/evolve1.py and remove the
> line 48 (assert). The evolution will then succeed.

Gediminas Paulauskas (menesis) wrote :

I thought this was fixed as Bug #882656, but apparently not.

Gediminas Paulauskas (menesis) wrote :

Removed assert, it works even when the condition is not true.

Changed in schooltool.gradebook:
status: New → Fix Committed
assignee: nobody → Gediminas Paulauskas (menesis)
milestone: none → 2.1.1
Changed in schooltool.gradebook:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments