[Zope] Error Type: AttributeError Error Value: __hash__ ??
Dieter Maurer
dieter@handshake.de
Thu, 16 Aug 2001 20:55:38 +0200 (CEST)
Gustav Franzsen writes:
> Have application using LoginManager. Users log in (username and password).
> Data stored in Mysql. Some users get abovementioned error when attempting
> to log in, whilst others have no problem. No obvious discernable difference
> in data in database between users (those that work and those that don't).
Something tries to put an object with "__cmp__" method
but without a "__hash__" method as key in a mapping object.
This is not possible.
The traceback should show you, where the problem occured.
This may tell you what is the culprit.
If not, you would catch the exception locally:
try: m[o]= something
except AttributeError:
import pdb; pdb.set_trace()
Under Unix, you should start Zope in the foreground
(do not know about Windows...).
When the problem occurs, the debugger will stop your
program and you can analyse what "o" is.
Dieter