Unable to evolve timetables

Bug #857539 reported by Gediminas Paulauskas
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SchoolTool
Fix Released
Critical
Justas Sadzevičius

Bug Description

Tried to upgrade an existing instance to flourish, unable to start with an error:

INFO:zope.app.generations:main db: evolving in mode EVOLVEMINIMUM
INFO:zope.app.generations:main db/schooltool: currently at generation 35, targetting generation 37
ERROR:zope.app.generations:main db/schooltool: failed to evolve to generation 36
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zope/app/generations/generations.py", line 494, in evolve
    manager.evolve(context, generation)
  File "/usr/lib/python2.7/dist-packages/zope/app/generations/generations.py", line 145, in evolve
    evolver.evolve(context)
  File "/usr/lib/python2.7/dist-packages/schooltool/generations/evolve36/__init__.py", line 37, in evolve
    evolveTimetables(app)
  File "/usr/lib/python2.7/dist-packages/schooltool/generations/evolve36/evolve.py", line 60, in evolveTimetables
    built = builder.build(app, BuildContext(shared=result))
  File "/usr/lib/python2.7/dist-packages/schooltool/generations/evolve36/schedule_builders.py", line 160, in build
    built = builder.build(schedule_root, context(app=app))
  File "/usr/lib/python2.7/dist-packages/schooltool/generations/evolve36/schedule_builders.py", line 121, in build
    owner=self.owner))
  File "/usr/lib/python2.7/dist-packages/schooltool/generations/evolve36/schedule_builders.py", line 83, in build
    period = context.shared.period_map[key]
KeyError: (1314654565, u'pirma-pamaina', u'Pirmadienis', u'ketvirta')
Traceback (most recent call last):
  File "/usr/bin/paster", line 18, in <module>
    command.run()
  File "/usr/lib/pymodules/python2.7/paste/script/command.py", line 84, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/pymodules/python2.7/paste/script/command.py", line 123, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/pymodules/python2.7/paste/script/command.py", line 218, in run
    result = self.command()
  File "/usr/lib/pymodules/python2.7/paste/script/serve.py", line 276, in command
    relative_to=base, global_conf=vars)
  File "/usr/lib/pymodules/python2.7/paste/script/serve.py", line 313, in loadapp
    **kw)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 204, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 225, in loadobj
    return context.create()
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 625, in create
    return self.object_type.invoke(self)
  File "/usr/lib/pymodules/python2.7/paste/deploy/loadwsgi.py", line 110, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/pymodules/python2.7/paste/deploy/util/fixtypeerror.py", line 57, 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 707, 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-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/generations/generations.py", line 521, in evolveMinimumSubscriber
    evolve(event.database, EVOLVEMINIMUM)
  File "/usr/lib/python2.7/dist-packages/zope/app/generations/generations.py", line 506, in evolve
    manager.generation)
zope.app.generations.interfaces.UnableToEvolve: (36, u'schooltool', 37)

tags: added: flourish traceback
removed: crash
Changed in schooltool:
milestone: 1.9.1 → 1.9.2
Changed in schooltool:
status: New → In Progress
Changed in schooltool:
status: In Progress → Fix Committed
Revision history for this message
Ikpeer (ikpeer) wrote :

This bug prevents me from using my database at all. Would it be possible to get the patch asap. I would be glad to help by checking it out on my system.

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

When you upgraded a backup Data.fs should have been put in /var/lib/schooltool

So in the short run you should be able to downgrade your packages back to the version in universe and copy the backup to Data.fs.

Might need a better explanation from Gediminas...

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

The fix is in the branch lp:~schooltool-owners/schooltool/flourish

Check it out, then

  $ make instance
  $ cp /var/lib/schooltool/Data.fs instance/var/
  $ make run

evolution should now work, and the instance run.

You can then copy the evolved Data.fs back to its place.

Revision history for this message
Ikpeer (ikpeer) wrote : Re: [Bug 857539] Re: Unable to evolve timetables

Thank you for quick responding.

I've found the branch "schooltool-owners/schooltool/flourish". But which
revision is it? Could you please give me some more detailed hint, what I have
to do?

Thank you very much for your help - and for schooltool at all (I use it every
day).

Andrej Keiper

Am Dienstag, 18. Oktober 2011, 16:04:54 schrieben Sie:
> The fix is in the branch lp:~schooltool-owners/schooltool/flourish
>
> Check it out, then
>
> $ make instance
> $ cp /var/lib/schooltool/Data.fs instance/var/
> $ make run
>
> evolution should now work, and the instance run.
>
> You can then copy the evolved Data.fs back to its place.

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

You just need to check out the current branch, so, a bit more explicitly...

Install bzr if you haven't: "sudo apt-get install bzr"
Then: "bzr branch lp:~schooltool-owners/schooltool/flourish"

That'll check out the code and put it in a directory named "flourish." You can then cd into that directory and do the remaining ("make...") steps above.

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

I wonder why have you encountered this error if you "use schooltool every day".

"flourish" series is in development still, so you would be installing this version only if you want to help us test that the new user interface. It is usable, but we are still fixing important bugs like this one.

Revision history for this message
Tom Hoffman (tom-hoffman) wrote :

Everyone isn't as disciplined a systems administrator as you Gediminas. ;-)

Revision history for this message
Ikpeer (ikpeer) wrote :
Download full text (9.6 KiB)

Hi, everybody!

> I wonder why have you encountered this error if you "use schooltool
> every day".
>
> "flourish" series is in development still, so you would be installing
> this version only if you want to help us test that the new user
> interface. It is usable, but we are still fixing important bugs like
> this one.

Some days ago I upgraded to Ubuntu 11.10. After the upgrade schooltool didn't
start up anymore, because of the failing evolving. That's why I installed what
I thought of being the actual version (1.9.1). There are some days left,
because we have still autumn vacations here. But in the next week I will need
it badly again.

So which is the production version for "Oneiric ocelot"? Where should I get
the packages?

I did the compiling as you pointed me to, but the instance could not be
evolved (output see below).

Thank you very much for your support.

Andrej Keiper

---------------------------------------------------------------------------------------------------------------
root@aduola:/usr/src/flourish# make run
bin/start-schooltool-instance instance
Reading configuration from /usr/src/flourish/instance/schooltool.conf
2011-10-20 17:24:58,056 main db: evolving in mode EVOLVEMINIMUM
2011-10-20 17:24:58,057 main db/schooltool: currently at generation 35,
targetting generation 37
2011-10-20 17:24:58,106 Couldn't load state for 0x26
Traceback (most recent call last):
  File "/usr/src/flourish/eggs/ZODB3-3.9.7-py2.7-linux-
x86_64.egg/ZODB/Connection.py", line 851, in setstate
    self._setstate(obj)
  File "/usr/src/flourish/eggs/ZODB3-3.9.7-py2.7-linux-
x86_64.egg/ZODB/Connection.py", line 919, in _setstate
    self._reader.setGhostState(obj, p)
  File "/usr/src/flourish/eggs/ZODB3-3.9.7-py2.7-linux-
x86_64.egg/ZODB/serialize.py", line 630, in setGhostState
    obj.__setstate__(state)
  File "/usr/src/flourish/eggs/zope.component-3.10.0-
py2.7.egg/zope/component/persistentregistry.py", line 40, in __setstate__
    self._createLookup()
  File "/usr/src/flourish/eggs/zope.interface-3.6.1-py2.7-linux-
x86_64.egg/zope/interface/adapter.py", line 91, in _createLookup
    self._v_lookup = self.LookupClass(self)
  File "/usr/src/flourish/eggs/zope.interface-3.6.1-py2.7-linux-
x86_64.egg/zope/interface/adapter.py", line 439, in __init__
    self.init_extendors()
  File "/usr/src/flourish/eggs/zope.interface-3.6.1-py2.7-linux-
x86_64.egg/zope/interface/adapter.py", line 476, in init_extendors
    self.add_extendor(p)
  File "/usr/src/flourish/eggs/zope.interface-3.6.1-py2.7-linux-
x86_64.egg/zope/interface/adapter.py", line 480, in add_extendor
    for i in provided.__iro__:
AttributeError: type object 'ICustomScoreSystem' has no attribute '__iro__'
2011-10-20 17:24:58,111 main db/schooltool: failed to evolve to generation 36
Traceback (most recent call last):
  File "/usr/src/flourish/eggs/zope.app.generations-3.6.0-
py2.7.egg/zope/app/generations/generations.py", line 494, in evolve
    manager.evolve(context, generation)
  File "/usr/src/flourish/eggs/zope.app.generations-3.6.0-
py2.7.egg/zope/app/generations/generations.py", line 145, in evolve
    evolver.evolve(context)
  File "/usr/src/flourish/src/schooltool/generations...

Read more...

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

OK. The official version of schooltool is already in Ubuntu since 11.04 . You do not need to use the SchoolTool PPA anymore, although there will be updates in there.

Until yesterday, there were 1.9.* packages in the ppa for oneiric. Now the "flourish" packages are in a separate PPA, https://launchpad.net/~schooltool-owners/+archive/dev , so that accidents like yours won't happen.

The last version in Ubuntu is 1.7.0 and that's what you should be upgrading to on production system.

To revert to Oneiric packages, do:

$ sudo apt-get install schooltool/oneiric python-schooltool/oneiric python-schooltool.gradebook/oneiric python-schooltool.intervention/oneiric python-schooltool.lyceum.journal/oneiric

Revision history for this message
Ikpeer (ikpeer) wrote :
Download full text (7.4 KiB)

Hi, everybody!

> OK. The official version of schooltool is already in Ubuntu since 11.04
> . You do not need to use the SchoolTool PPA anymore, although there will
> be updates in there.
>
> Until yesterday, there were 1.9.* packages in the ppa for oneiric. Now
> the "flourish" packages are in a separate PPA, https://launchpad.net
> /~schooltool-owners/+archive/dev , so that accidents like yours won't
> happen.
>
> The last version in Ubuntu is 1.7.0 and that's what you should be
> upgrading to on production system.
>
> To revert to Oneiric packages, do:
>
> $ sudo apt-get install schooltool/oneiric python-schooltool/oneiric
> python-schooltool.gradebook/oneiric python-
> schooltool.intervention/oneiric python-schooltool.lyceum.journal/oneiric

Done. But ist doesn't start. Maybe this is another bug at all? Could you
please have a look at the logfiles below?

Thank you and best regards

Andrej Keiper

error.log:
-------------------------------------------------------------------------------------------------------------
2011-10-20 19:37:00,237 main db: evolving in mode EVOLVEMINIMUM
2011-10-20 19:37:00,238 main db/schooltool.requirement: running install
generation
2011-10-20 19:37:00,268 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 67, in evolve
    removeUtils(site_manager, ICustomScoreSystem)
  File "/usr/lib/python2.7/dist-
packages/schooltool/requirement/generations/evolve1.py", line 46, in
removeUtils
    assert n_provided == n_utils
AssertionError
----------------------------------------------------------------------------------------------------------------

paste.log
----------------------------------------------------------------------------------------------------------------
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 67, in evolve
    removeUtils(site_manager, ICustomScoreSystem)
  File "/usr/lib/python2.7/dist-
packages/schoolto...

Read more...

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

This last failure is in a different place. Created Bug #882656 for it

Changed in schooltool:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.