Python metaclass conflict/Type error
<p>I'm debugging a python script (python isn't my go to language), and this is the first time I'm working with metaclass's in python. I'm getting a metaclass conflict error when I run the code as it is below.</p>

<pre><code>TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
</code></pre>

<p>In attempting to solve it I commented out the metaclass declaration in <code>MySQLMSoftware</code>, thinking that it's redundant as it inherits from a class with the same metaclass declaration, but this leads to: </p>

<pre><code>TypeError: Error when calling the metaclass bases
    module.__init__() takes at most 2 arguments (3 given)
</code></pre>

<p>Any insight, guidance or direction would be greatly appreciated. I've been reading about python's metaclass implementation and the issue isn't popping out so far.</p>

<p><strong>MSoftware.py</strong></p>

<pre><code>from abc import ABCMeta, abstractmethod

class MSoftware(object) :
    __metaclass__ = ABCMeta

    def __init__(self,name,spark=None,mysql=None):
        self.name = name
        ...
</code></pre>

<p><strong>MySQLMSoftware.py</strong></p>

<pre><code>from mouse import Mouse, MSoftware
from abc import ABCMeta, abstractmethod

class MySQLMSoftware(MSoftware): # Traceback always goes here
    __metaclass__ = ABCMeta

    MAX_ROWS = 30000000

    def __init__(self,name,years,spark=None,mysql=None):
        MSoftware.__init__(self,name,spark,mysql)
        self.years = years
        ...
</code></pre>

<p><strong>TTime.py</strong></p>

<pre><code>from mouse.Mouse import Mouse
from mouse.MySQLMSoftware import MySQLMSoftware

class TTime(MySQLMSoftware) :

    DATABASE = "Database"
    NAME = "table"
    YEARS = [2014,2016]

    def __init__(self,spark=None,mysql=None):
        MySQLMSoftware.__init__(self,TTime.NAME,TTime.YEARS,spark,mysql)
        ...
</code></pre>

<p><strong>main.py</strong></p>

<pre><code>import sys
from mouse.Mouse import Mouse
from mouse.TTime import TTime

...
</code></pre>