Skip to content

Instantly share code, notes, and snippets.

@vmaks
Last active August 26, 2018 18:45
Show Gist options
  • Save vmaks/17ab06089186d5c1b3bf to your computer and use it in GitHub Desktop.
Save vmaks/17ab06089186d5c1b3bf to your computer and use it in GitHub Desktop.
python super TypeError: must be type, not classobj
If you face with an error like this while use "super":
"TypeError: must be type, not classobj"
link:
http://stackoverflow.com/questions/489269/python-super-raises-typeerror-why
Solution: add inheratence from the "object" class in the base class.
class Class1(object):
def __init__(self):
pass
class Class2(Class1):
def __init__(self):
super(Class2, self).__init__()
super(self.__class__, self).__init__()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment