title: pyinstaller [ErrNo 22]
body: <p>I'm trying to use Pyinstaller to make an exe of my python code to easily distribute. Every time I try run pyinstaller.py I get an error "[Errno 22] invalid mode ('rb') or filename: ''"</p>
  
  <p>I've seen a few other posts on this issue saying the problem is usually caused by hardcoding in filepaths for reading data, but all my filepaths are done using variables and asking the user where the files are located. </p>
  
  <pre><code>File "pyinstaller.py", line 18, in &lt;module&gt;
  run()
  File "\PyInstaller-2.1\PyInstaller-2.1\PyInstaller\main.py", line 88, in run
  run_build(opts, spec_file, pyi_config)
  File "\PyInstaller-2.1\PyInstaller-2.1\PyInstaller\main.py", line 46, in run_build
  PyInstaller.build.main(pyi_config, spec_file, **opts.__dict__)
  File "\PyInstaller-2.1\PyInstaller-2.1\PyInstaller\build.py", line 1924, in main
  build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "\PyInstaller-2.1\PyInstaller-2.1\PyInstaller\build.py", line 1873, in build
  execfile(spec)
  File "\PyInstaller-2.1\PyInstaller-2.1\guimain\guimain.spec", line 17, in &lt;module&gt;
  console=True )
  File "\PyInstaller-2.1\PyInstaller-2.1\PyInstaller\build.py", line 1170, in __init__
  strip_binaries=self.strip, upx_binaries=self.upx,
  File "\PyInstaller-2.1\PyInstaller-2.1\PyInstaller\build.py", line 1008, in __init__
  self.__postinit__()
  File "\PyInstaller-2.1\PyInstaller-2.1\PyInstaller\build.py", line 309, in __postinit__
  self.assemble()
  File "\PyInstaller-2.1\PyInstaller-2.1\PyInstaller\build.py", line 1050, in assemble
  dist_nm=inm)
  File "\PyInstaller-2.1\PyInstaller-2.1\PyInstaller\build.py", line 842, in checkCache
  digest = cacheDigest(fnm)
  File "\PyInstaller-2.1\PyInstaller-2.1\PyInstaller\build.py", line 796, in cacheDigest
  data = open(fnm, "rb").read()
  IOError: [Errno 22] invalid mode ('rb') or filename: ''
  </code></pre>
  
  <p>anyone have any ideas how I can start to fix this? </p>
  
  <p>edit: Using version 2.1 of pyinstaller</p>
  
  <p>edit: So I tried testing my code by creating this:</p>
  
  <pre><code>import pandas as pd
  
  if __name__ == '__main__':
      maindata = pd.DataFrame
      print maindata
  </code></pre>
  
  <p>which is giving me the same error.</p>