title: Why do I get back a Traceback(most recent call last) error?
body: <p>I have recently been working on a classifier that works on determining malignancy of breast cancer tumors. However I keep getting a traceback error at the end of the code.</p>
  
  <pre><code>def main():
  # TODO
       print ("Reading in training data...")
       trainingSet = []
       trainingFile = "cancerTrainingData.txt"
  
       trainingSet = makeTrainingSet(trainingFile)
       print ("Done reading training data.\n")
  
       print ("Training classifier...")   
  
       trainedClassifier = trainClassifier(trainingSet)
       print ("Done training classifier.\n")
  
       print ("Present Classifier Stats")
  
       dumpStats(trainedClassifier[0], trainedClassifier[1], trainedClassifier[2]) 
  
       print ("Reading in test data...")
       testFile = "cancerTestingData.txt"
       testSet = makeTestSet(testFile)
       print ("Done reading test data.\n")
  
       print ("Classifying records...")
  
       classifiedTestSet = classifyTestRecords(testSet, trainedClassifier[0])
  
       print ("Done classifying.\n")
  
       reportAccuracy(classifiedTestSet)
  
       print ("Check some Patients")
  
       checkSomePatients(classifiedTestSet, trainedClassifier[0])    
  
       print ("Program finished.\n")
  
  main()
  </code></pre>
  
  <p>The code gives back the following error:</p>
  
  <pre><code>TypeError                                 Traceback (most recent call last) 
  &lt;ipython-input-10-db4d57bf1cdf&gt; in &lt;module&gt;()
  356     print ("Program finished.\n")
  357
  --&gt; 358 main()
  </code></pre>
  
  <p>I would appreciate it if someone could point out how to fix this. Thank you!</p>