Python 'Object has no attribute'
<p>Code gives the following error:</p>

<p>"'module' Object has no attribute 'checkNone'"</p>

<p>Dir setup:</p>

<pre><code>+main.py
    Sorcery
    +Check.py
</code></pre>

<p>main.py</p>

<pre><code>from Sorcery import Check
check = Check.checkNone(None);
</code></pre>

<p>Check.py</p>

<pre><code>class Check:
    def checkNone(content):
        if content == None:
            print("None!")
        else:
            print("Check!")
            return content
</code></pre>

<p>First, rename the <code>Check.py</code> to anything you like, e.g.,<code>jacs.py</code>. Inside <code>jacs.py</code>,  change <code>Class Check: def checkNone(content):</code> to <code>Class Check(object): def checkNone(self, content):</code>.<br>
Then, in <code>main.py</code>, begin with   </p>

<pre><code>from Sorcery.jacs import Check
output = Check.checkNone(None)
</code></pre>

python object module