The aim of the following code is to dynamically create a class based on the user's input.
class BaseClass:
def __init__(self):
self.placeholder = ""
if __name__ == '__main__':
className = input("Please enter the name of new class: ")
baseClass = input("Please enter name of base class: ")
try:
newClass = type(className, tuple(baseClass), {})
print(f"Class {newClass} Created")
except TypeError as e:
print(e)
However, upon entering the input:
NewClass
BaseClass
I receive the follwing exception:
metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
Why the program doesn't recognized the class BaseClass? What would be the proper use of the type function?
Note: I'm running python v3.9.6.

baseClassis a string not a reference to the actual class itself