tqdm: 'module' object is not callable
<p>I import tqdm as this:</p>

<pre><code>import tqdm
</code></pre>

<p>I am using tqdm to show progress in my python3 code, but I have the following error:</p>

<pre><code>Traceback (most recent call last):
  File "process.py", line 15, in &lt;module&gt;
    for dir in tqdm(os.listdir(path), desc = 'dirs'):
TypeError: 'module' object is not callable
</code></pre>

<p>Here is the code:</p>

<pre><code>path = '../dialogs'
dirs = os.listdir(path)

for dir in tqdm(dirs, desc = 'dirs'):
    print(dir)
</code></pre>

<p>The error is telling you are trying to call the module. You can't do this.</p>

<p>To call you just have to do</p>

<pre><code>tqdm.tqdm(dirs, desc = 'dirs') 
</code></pre>

<p>to solve your problem. Or simply change your import to</p>

<pre><code>from tqdm import tqdm
</code></pre>

<p>But, the important thing here is to review the documentation for what you are using and ensure you are using it properly.</p>

python tqdm