Variable not the same type in two different functions
<p>I have two functions which print into an excel file. THe only input is the file name. Here is the code:</p>

<pre><code>#excelpy
import excelpy

#Tinker
from Tkinter import *
from tkSimpleDialog import *
from tkFileDialog import *
</code></pre>

<p>Function Mode1</p>

<pre><code>def Mode1(full_name):
    print full_name
    print type(full_name) 
    testwbook = excelpy.workbook(full_name) 
    testwbook.show() 
    testwbook.set_cell((1,1),'TEST1', fontColor='red') 
    testwbook.set_range(2,1,['Number','Name']) 
    m1 = testwbook.save(full_name)
    testwbook.close()
    return m1
</code></pre>

<p>Function Mode2</p>

<pre><code>def Mode2(full_name):
    print full_name
    print type(full_name) 
    testwbook = excelpy.workbook(full_name) 
    testwbook.show() 
    testwbook.set_cell((1,1),'TEST2', fontColor='red') 
    testwbook.set_range(2,1,['Number','Name']) 
    m2 = testwbook.save(full_name)
    testwbook.close()
    return m2
</code></pre>

<p>Main</p>

<pre><code>root = Tk()
d = str(asksaveasfilename(parent=root,filetypes=[('Excel','*.xls')],title="Save report as..."))
d = d + '.xls'
d = d.replace('/','\\')
root.destroy()  

Mode1(d)
Mode2(d)
</code></pre>

<p>And once in a while I get the following error:</p>

<pre><code>Traceback (most recent call last):
  File "T:\TEST\testpy.py", line 2035, in &lt;module&gt;
    Mode2(d)
  File ""T:\TEST\testpy.py"", line 1381, in Mode2
    print type(full_name) 
TypeError: 'str' object is not callable
</code></pre>

<p>Any idea why is this happening? How can I prevent it?</p>
