FreshInstall: Exception TypeError: Object has default comparison

Bug #1290996 reported by Tyeth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SchoolTool
New
High
Unassigned

Bug Description

After a fresh install via APT, edited paste.ini to allow remote access. Restarted service, then tried to open interface.
On first open at <ourdomain>:7080/
and equally localhost:7080

Exception

TypeError: Object has default comparison

Traceback

File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 129, in publish
  obj = request.traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/browser.py", line 540, in traverse
  ob = super(BrowserRequest, self).traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/http.py", line 457, in traverse
  ob = super(HTTPRequest, self).traverse(obj)
File "/usr/lib/python2.7/dist-packages/zope/publisher/base.py", line 249, in traverse
  publication.callTraversalHooks(self, obj)
File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 137, in callTraversalHooks
  self._maybePlacefullyAuthenticate(request, ob)
File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 124, in _maybePlacefullyAuthenticate
  principal = auth.authenticate(request)
File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py", line 221, in authenticate
  return self.authPlugin.authenticate(request)
File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py", line 96, in authenticate
  if self._checkPlainTextPassword(login, creds.getPassword()):
File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py", line 101, in _checkPlainTextPassword
  if username in app['persons']:
File "/usr/lib/python2.7/dist-packages/zope/container/btree.py", line 80, in __contains__
  return key in self._SampleContainer__data

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

What version of Ubuntu? SchoolTool doesn't work on Trusty yet.

Revision history for this message
Tyeth (tyeth) wrote :

Ubuntu 12.10,
installed from cloud vpn provided by DigitalOcean,
as a presetup install for wordpress and dependencies.

Revision history for this message
Tyeth (tyeth) wrote :

I read the erroroneous code used to be acceptable practise and now is reported as an error.
Something about the Sort key used being None?

See:
https://mail.zope.org/pipermail/zope-dev/2012-December/044978.html

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

What version of SchoolTool?

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

Looks to me that the database was not initialized correctly.

There was no data entered? Delete the database and try again.

$ sudo service schooltool stop
$ sudo rm -r /var/lib/schooltool/*
$ sudo service schooltool start

Revision history for this message
tyeth (tyethgundry) wrote : Re: [Bug 1290996] Re: FreshInstall: Exception TypeError: Object has default comparison

Tried suggested steps. No joy. Same Error.

Your School - server running SchoolTool 2.1.1<http://localhost:7080/about.html>

On 13 March 2014 14:43, Gediminas Paulauskas <email address hidden> wrote:

> Looks to me that the database was not initialized correctly.
>
> There was no data entered? Delete the database and try again.
>
> $ sudo service schooltool stop
> $ sudo rm -r /var/lib/schooltool/*
> $ sudo service schooltool start
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1290996
>
> Title:
> FreshInstall: Exception TypeError: Object has default comparison
>
> Status in SchoolTool:
> New
>
> Bug description:
> After a fresh install via APT, edited paste.ini to allow remote access.
> Restarted service, then tried to open interface.
> On first open at <ourdomain>:7080/
> and equally localhost:7080
>
>
> Exception
>
> TypeError: Object has default comparison
>
> Traceback
>
> File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line
> 129, in publish
> obj = request.traverse(obj)
> File "/usr/lib/python2.7/dist-packages/zope/publisher/browser.py", line
> 540, in traverse
> ob = super(BrowserRequest, self).traverse(obj)
> File "/usr/lib/python2.7/dist-packages/zope/publisher/http.py", line
> 457, in traverse
> ob = super(HTTPRequest, self).traverse(obj)
> File "/usr/lib/python2.7/dist-packages/zope/publisher/base.py", line
> 249, in traverse
> publication.callTraversalHooks(self, obj)
> File
> "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py",
> line 137, in callTraversalHooks
> self._maybePlacefullyAuthenticate(request, ob)
> File
> "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py",
> line 124, in _maybePlacefullyAuthenticate
> principal = auth.authenticate(request)
> File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py", line
> 221, in authenticate
> return self.authPlugin.authenticate(request)
> File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py", line
> 96, in authenticate
> if self._checkPlainTextPassword(login, creds.getPassword()):
> File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py", line
> 101, in _checkPlainTextPassword
> if username in app['persons']:
> File "/usr/lib/python2.7/dist-packages/zope/container/btree.py", line
> 80, in __contains__
> return key in self._SampleContainer__data
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/schooltool/+bug/1290996/+subscriptions
>

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

This means username is None, and that is very strange.

Moreover, the error happens in Basic authentication code path. Do you get a browser dialog asking for username and password when trying to access schooltool? Is this kind of authentication set up in apache?

Maybe direct access to the login page would avoid this code being invoked, try http://localhost:7080/login.html

Revision history for this message
tyeth (tyethgundry) wrote :

I have also manually tried to reset the admin user password as suggested if
locked out, but equally failed. Since then I have purged my copy of
schooltool and reinstalled but with no change in results.

Accessing the login page directly produced the same error.
 I have never been presented with the basic http auth request while using
schooltools.

Thanks all for your help...

On 13 March 2014 15:13, Tyeth <email address hidden> wrote:

> Tried suggested steps. No joy. Same Error.
>
> Your School - server running SchoolTool 2.1.1<http://localhost:7080/about.html>
>
>
> On 13 March 2014 14:43, Gediminas Paulauskas <email address hidden> wrote:
>
>> Looks to me that the database was not initialized correctly.
>>
>> There was no data entered? Delete the database and try again.
>>
>> $ sudo service schooltool stop
>> $ sudo rm -r /var/lib/schooltool/*
>> $ sudo service schooltool start
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1290996
>>
>> Title:
>> FreshInstall: Exception TypeError: Object has default comparison
>>
>> Status in SchoolTool:
>> New
>>
>> Bug description:
>> After a fresh install via APT, edited paste.ini to allow remote access.
>> Restarted service, then tried to open interface.
>> On first open at <ourdomain>:7080/
>> and equally localhost:7080
>>
>>
>> Exception
>>
>> TypeError: Object has default comparison
>>
>> Traceback
>>
>> File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line
>> 129, in publish
>> obj = request.traverse(obj)
>> File "/usr/lib/python2.7/dist-packages/zope/publisher/browser.py", line
>> 540, in traverse
>> ob = super(BrowserRequest, self).traverse(obj)
>> File "/usr/lib/python2.7/dist-packages/zope/publisher/http.py", line
>> 457, in traverse
>> ob = super(HTTPRequest, self).traverse(obj)
>> File "/usr/lib/python2.7/dist-packages/zope/publisher/base.py", line
>> 249, in traverse
>> publication.callTraversalHooks(self, obj)
>> File
>> "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py",
>> line 137, in callTraversalHooks
>> self._maybePlacefullyAuthenticate(request, ob)
>> File
>> "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py",
>> line 124, in _maybePlacefullyAuthenticate
>> principal = auth.authenticate(request)
>> File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py",
>> line 221, in authenticate
>> return self.authPlugin.authenticate(request)
>> File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py",
>> line 96, in authenticate
>> if self._checkPlainTextPassword(login, creds.getPassword()):
>> File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py",
>> line 101, in _checkPlainTextPassword
>> if username in app['persons']:
>> File "/usr/lib/python2.7/dist-packages/zope/container/btree.py", line
>> 80, in __contains__
>> return key in self._SampleContainer__data
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/schooltool/+bug/1290996/+subscriptions
>>
>
>

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

Deleted database according to recommended instructions before, but no change.
  Could it be a zope system config setting, as I'm running another zope python application on the server. It's a pyramid (pylons) based application.
-just a thought

On 13 Mar 2014, at 23:14, Tom Hoffman <email address hidden> wrote:

> Did you try deleting the database?
>
> http://book.schooltool.org/database.html?highlight=database#how-can-i
> -erase-the-entire-database
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1290996
>
> Title:
> FreshInstall: Exception TypeError: Object has default comparison
>
> Status in SchoolTool:
> New
>
> Bug description:
> After a fresh install via APT, edited paste.ini to allow remote access. Restarted service, then tried to open interface.
> On first open at <ourdomain>:7080/
> and equally localhost:7080
>
>
> Exception
>
> TypeError: Object has default comparison
>
> Traceback
>
> File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 129, in publish
> obj = request.traverse(obj)
> File "/usr/lib/python2.7/dist-packages/zope/publisher/browser.py", line 540, in traverse
> ob = super(BrowserRequest, self).traverse(obj)
> File "/usr/lib/python2.7/dist-packages/zope/publisher/http.py", line 457, in traverse
> ob = super(HTTPRequest, self).traverse(obj)
> File "/usr/lib/python2.7/dist-packages/zope/publisher/base.py", line 249, in traverse
> publication.callTraversalHooks(self, obj)
> File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 137, in callTraversalHooks
> self._maybePlacefullyAuthenticate(request, ob)
> File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 124, in _maybePlacefullyAuthenticate
> principal = auth.authenticate(request)
> File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py", line 221, in authenticate
> return self.authPlugin.authenticate(request)
> File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py", line 96, in authenticate
> if self._checkPlainTextPassword(login, creds.getPassword()):
> File "/usr/lib/python2.7/dist-packages/schooltool/app/security.py", line 101, in _checkPlainTextPassword
> if username in app['persons']:
> File "/usr/lib/python2.7/dist-packages/zope/container/btree.py", line 80, in __contains__
> return key in self._SampleContainer__data
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/schooltool/+bug/1290996/+subscriptions

Changed in schooltool:
importance: Undecided → High
Revision history for this message
Joe Steeve (joe.steeve) wrote :

Looks like you hit https://github.com/zopefoundation/ZODB3/issues/1

Pinning ZODB3 to 3.10.5 in buildout.cfg sorted this issue for us (in a different project).

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.