title: TypeError: 'unicode' object is not callable - error occurs only when script is called via another
body: <p>I have the following code</p>
  
  <pre><code>#unzip
  inF = gzip.GzipFile(os.path.join(homePath), 'rb')
  s = inF.read()
  inF.close()
  
  outfile = homeDir[0:14]+'\\fme\\'+gridRef+".asc"
  outfile = outfile.encode('ascii', 'ignore')
  print 'outfile is', outfile
  outF = file(outfile, 'wb')
  outF.write(s)
  outF.close()
  </code></pre>
  
  <p>Which is called from another script <code>sequence.py</code> and throws the following error</p>
  
  <pre><code>  File "gridFunction.py", line 164, in &lt;module&gt;
      outF = file('C:\LiDAR_Temp\\fme\SU2745.asc', 'wb')
  TypeError: 'unicode' object is not callable
  </code></pre>
  
  <p>If I run the scripts contained within <code>sequence.py</code> individually and in the same order, it works fine. Why am I seeing this error when I trigger the script via another, and how could I resolve the issue?</p>
  
  <p>TIA</p>