For some reason, the super()
method is not always behaving as expected, opting to return:
TypeError(\'super(type, obj): obj must be an instance or
I'm not sure why the error is happening, but as an aid to debugging you could wrap the call to super
in a try/except
block and do a data dump when the exception is raised. Something like this:
class Retrieval(DBConnection.DBAdminConnection):
def __init__(self, username=None, password=None, unique_key=None):
try:
super(Retrieval,self).__init__()
except TypeError, e:
print "Failure initialising Retrieval --> self: %r"
raise
if username and password:
self.username = username
self.user.login(username,password, config.DATABASE)
if self.user.error:
raise UserLoginError(username)
self.unique_key = unique_key