Coding⏱️ 2 min read📅 2026-06-03

How to Fix: super() fails with error: TypeError "argument 1 must be type, not classobj" when parent does not inherit from object

TypeError super() argument 1 must be type, not classobj when parent does not inherit from object

Quick Answer: Inherit from the object class in the parent class to fix the error.

In Python, the built-in super() function is used to access methods from a parent class. However, when using super(), it's essential to ensure that both the child and parent classes inherit from the object class.

🔧 Proven Troubleshooting Steps

Method 1: Understanding the object Class

  1. Step 1: In Python 2, all classes implicitly inherit from object, so you don't need to do anything. However, in Python 3, this is not the case.

Method 2: Using the '__mro__' Attribute

  1. Step 1: Check if your parent class inherits from object. If it doesn't, you'll need to modify the parent class or use a different approach.

💡 Conclusion

To fix this issue, ensure that your child class inherits from object, or use a different approach such as using the '__mro__' attribute to access methods from parent classes.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions