traceback when enabling gradebook on Fedora RPM's

Bug #620866 reported by Tom Hoffman on 2010-08-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gediminas Paulauskas

Bug Description

When our friends in Nepal try to fire up the RPM's they're working on with gradebook (or any other plugin, presumably) enabled by including in instance_folder/school.zcml file <include package="schooltool.gradebook" />, they get the traceback here:

For reference, the RPM's are here:

Changed in schooltool:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Gediminas Paulauskas (menesis)
Douglas Cerna (replaceafill) wrote :


aks th1a: nope, to enable gradebook, i added in instance_folder/school.zcml file <include package="schooltool.gradebook" />

and looking at the error in the adapter lookup:

File "/usr/lib/python2.5/site-packages/schooltool/gradebook/generations/", line 81, in evolve
ssProxy = IScoreSystemsProxy(app)
TypeError: ('Could not adapt', < object at 0xa401c2c>, <InterfaceClass schooltool.requirement.interfaces.IScoreSystemsProxy>)

the IScoreSystemsProxy adapter comes from the requirement package, so I guess they need to add:

<include package="schooltool.requirement" />

to their instance's 'school.zcml' file just before the <include package="schooltool.gradebook" /> line.

Krishna Giri (krishna-giri) wrote :

Finally adding these lines:
<include package="z3c.optionstorage" />
<include package="schooltool.requirement" />
<include package="schooltool.gradebook" />

 on "/usr/lib/python2.5/site-packages/schooltool/stapp2007/configure.zcml" file workes fine.
We even packaged "schooltool.lyceum.journal" and "schooltool.intervention" and installed. Again added the line

<include package="schooltool.lyceum.journal" />
<include package="schooltool.intervention" />

on the same file. It also workes fine.

Now again we came to a problem. After creating a school-year when we try to create persons it throws an error::
But before creating school-year when we try to create persons it works fine........

It seems that some of the packaged libraries have too high versions.


In this case, the problem is caused by z3c.form, but you should package the exact versions of all other packages (in Zope's world it is called KGS - known good set).

Apologies that I forgot to mention earlier... The removed line disables aut detection/inclusion of other SchoolTool parts:
<includePlugins package="schooltool" file="plugin.zcml" />
That's why you needed to add includes by hand.

If you want to investigate why auto-inclusion failed in the first place, try this:
$ python2.5

>>> import sys, itertools, pkg_resources
>>> paths = sorted(sys.path)
>>> distributions = list(itertools.chain(*[pkg_resources.find_distributions(path, True) for path in sys.path]))
>>> dist_names = sorted([repr(d) for d in distributions])

Following should print a lot of paths, many containing "zope" and ending with ".egg". You should see "schooltool.***.egg" there also (

>>> for path in paths: print path

And this will list the libraries that are known by pkg_resources. If schooltool or zope is not there, auto-inclusion will not work..

>>> for name in dist_names: print name

Krishna Giri (krishna-giri) wrote :

We have different version in most of the packages then:: . Do we need all the versions same? If so, we need to re-bundle most of the packages.

Is there any source packages available somewhere in launchpad** with those versions as I can't find most of the packages with lower version...

Yes, all versions need to match. Don't be afraid to write scripts for packaging, where it makes sense - our KGS changes with almost every release. It can become a very tedious task to do everything by hand.

Most of them should be available in PyPI; you can access them by appending version to the egg name, like this:

You should also be able to get the .tar.gz's at

Also, check for SchoolTool, Reportlab and few other .tar.gz's.

Krishna Giri (krishna-giri) wrote :

We successfully packaged all the required packages according to version :: But again when we try to "start-schooltool-instance instance" it gives the following error::


  You're likely missing namespace package. Just put the attached into ...python-site-packges.../zope/app/ with the rest of the sources.

  IIRC none of the Zope packages bring zope/app/ for some reason; and we also have a separate .deb that does the above.


Changed in schooltool:
status: Triaged → Fix Committed
Krishna Giri (krishna-giri) wrote :

We again encounter a problem after packaging schooltool 1.5.1 for our schoolserver. Here's the error::
Also its not showing any groups while creating users

tags: added: packaging rpm

Default groups are created for each school year. You need to set up at least one school year for them to appear.

As for the evolution it looks like broken KGS (set of package versions) at the first glance. We'll look into it.

Gediminas Paulauskas (menesis) wrote :

There is a bug in package, it used an API that was removed long ago. I have fixed it:

You could apply this patch to your package, or wait until I make a new release of it.

Gediminas Paulauskas (menesis) wrote :

I have released a new upstream version:

Please package and test if this fixes your startup problem.

On 12/22/2010 09:46 PM, Gediminas Paulauskas wrote:
> I have released a new upstream version:
> Please package and test if this fixes your startup problem.
Ok, I'll test it.

Abhishek Singh

Changed in schooltool:
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