title: NK model.TypeError: coercing to Unicode: need string or buffer, NoneType found
body: <p>I am trying to get Kauffman's NK model. It is giving error on line 31</p>
  
  <pre><code>f = open(options.in_filenames)'
  </code></pre>
  
  <blockquote>
    <p>Traceback (most recent call last): File "F:\WoRk\simulations\nkprocess.py", line 33, in &lt;module> f = open(options.in_filenames,"F:/WoRk/social network") TypeError: coercing to Unicode: need string or buffer, NoneType found</p>
  </blockquote>
  
  <pre><code>import csv
  from numpy import *
  import Gnuplot
  import time
  from optparse import OptionParser
  from pylab import *
  # set up and read command line options
  
  
  parser = OptionParser()
  parser.add_option("-f", "--file", dest="in_filenames",
                    help="read data from FILE - enclose comma-separated   file list in quotes e.g. \"FILE1, FILE2\"", metavar="FILE")
  
  
  (options, args) = parser.parse_args()
  
  
  
  # set up constants
  
  # column titles
  columnvar_titles = (["A", "N", "K"])
  series_titles = (["Average Fitness", "Maximum Fitness","Minimum Fitness",
         "Average Wait Before Move","Maximum Wait Before Move",
         "Minimum Wait Before Move","Average Number of Fitter Neighbours",
         "Maximum Number of Fitter Neighbours",
         "Minimum Number of Fitter Neighbours"])
  
  
  f = open(options.in_filenames)
  reader = csv.reader(f)
  floats = []
  options_dict={}
  </code></pre>