traceback when enabling gradebook on Fedora RPM's

Bug #620866 reported by Tom Hoffman
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool
Fix Released
High
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:

http://fpaste.org/CK2Z/

For reference, the RPM's are here:

http://git.olenepal.org/schooltool/schooltool-rpm

Tags: packaging rpm
Changed in schooltool:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Gediminas Paulauskas (menesis)
Revision history for this message
Douglas Cerna (replaceafill) wrote :

Reading http://schooltool.pov.lt/irclogs/%23schooltool.2010-08-19.log.html#t2010-08-19T18:53:47

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/evolve1.py", line 81, in evolve
ssProxy = IScoreSystemsProxy(app)
TypeError: ('Could not adapt', <schooltool.app.app.SchoolToolApplication 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.

Revision history for this message
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:: http://fpaste.org/k748/
But before creating school-year when we try to create persons it works fine........

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) wrote :

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

See http://ftp.schooltool.org/schooltool/trunk/versions.cfg
VS http://git.olenepal.org/schooltool/schooltool-rpm/trees/master/SOURCES

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).

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) wrote :

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

Revision history for this message
Krishna Giri (krishna-giri) wrote :

We have different version in most of the packages then:: http://ftp.schooltool.org/schooltool/trunk/versions.cfg . 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...

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) wrote :

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: http://pypi.python.org/pypi/z3c.form/1.9.0

You should also be able to get the .tar.gz's at https://edge.launchpad.net/~schooltool-owners/+archive/ppa/+packages?field.name_filter=&field.status_filter=published&field.series_filter=lucid

Also, check http://ftp.schooltool.org/schooltool/1.4/ for SchoolTool, Reportlab and few other .tar.gz's.

Revision history for this message
Krishna Giri (krishna-giri) wrote :

Hi,
We successfully packaged all the required packages according to version :: http://ftp.schooltool.org/schooltool/trunk/versions.cfg. But again when we try to "start-schooltool-instance instance" it gives the following error:: http://fpaste.org/5wuX/

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) wrote :

Hi,

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

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

Cheers,

Changed in schooltool:
status: Triaged → Fix Committed
Revision history for this message
Krishna Giri (krishna-giri) wrote :

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

tags: added: packaging rpm
Revision history for this message
Justas Sadzevičius (justas.sadzevicius) wrote :

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.

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

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

http://zope3.pov.lt/trac/changeset/118853/zope.app.zopeappgenerations

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

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

I have released a new upstream version: http://pypi.python.org/pypi/zope.app.zopeappgenerations/3.5.1

Please package and test if this fixes your startup problem.

Revision history for this message
Abhishek Singh (aks) wrote : Re: [Bug 620866] Re: traceback when enabling gradebook on Fedora RPM's

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

--
Abhishek Singh
http://www.asingh.com.np

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

Bug attachments

Remote bug watches

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