Mixin class error

Ed Leafe ed at leafe.com
Mon Mar 6 22:58:27 CET 2006

	In Dabo, we create cursor classes that combine the backend-specific  
dbapi cursor class with our own mixin class that adds framework- 
specific behaviors. This has been working well for a couple of years  
now with many different backends, but today I'm getting errors with  
our Firebird class. I've checked the kinterbasdb site, and found  
nothing there that was helpful. The error reads:

TypeError: Error when calling the metaclass bases
     type 'kinterbasdb.Cursor' is not an acceptable base type

	Here's some simple code that will generate the error:

import kinterbasdb
KCursor = kinterbasdb.Cursor

class TestMixin(object): pass
# This next line will raise the error.
class CombinedCursor(TestMixin, KCursor): pass
myCursor = CombinedCursor()

	I'm not sure exactly what this error message means, so I don't know  
how to go about fixing it. Here's my setup:

Windows 2000
Python v. 2.4.1
kinterbasdb 3.2.0a1
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com

More information about the Python-list mailing list