title: Python: Can't convert 'bytes' object to str implicitly
body: <p>Here's my code:</p>
  
  <pre><code>class ReviewCategoryClassifier(object):
        @classmethod
        def load_data(cls, input_file):
             job = category_predictor.CategoryPredictor()
             category_counts = None
             word_counts = {}
  
             with open(input_file) as src:
                for line in src:
                  category, counts = job.parse_output_line(line)
  
        def __init__(self, input_file):
        """input_file: the output of the CategoryPredictor job."""
             category_counts, word_counts = self.load_data(input_file)
  
             self.word_given_cat_prob = {}
             for cat, counts in word_counts.iteritems():
                 self.word_given_cat_prob[cat] = self.normalize_counts(counts)
  
                # filter out categories which have no words
                 seen_categories = set(word_counts)
                 seen_category_counts = dict((cat, count) for cat, count in 
                                        category_counts.iteritems() \
                                              if cat in seen_categories)
                 self.category_prob= self.normalize_counts(
                                                        seen_category_counts)
  
  if __name__ == "__main__":
       input_file = sys.argv[1]
       text = sys.argv[2]
       guesses = ReviewCategoryClassifier(input_file).classify(text)
  </code></pre>
  
  <p>btw CategoryPredictor() is a mrjob project.</p>
  
  <p>Whenever I typed in </p>
  
  <blockquote>
    <p>python predict.py yelp_academic_dataset_review.json 'I like donut'</p>
  </blockquote>
  
  <p>in the command line, it has an error that says:</p>
  
  <blockquote>
    <p>TypeError: Can't convert 'bytes' object to str implicitly</p>
  </blockquote>
  
  <p>But line is a string instead a bytes object. What did I do wrong?</p>
  
  <p>Here's the full traceback</p>
  
  <pre><code>Traceback (most recent call last):
  File "predict.py", line 116, in &lt;module&gt;
    guesses = ReviewCategoryClassifier(input_file).classify(text)
  File "predict.py", line 65, in __init__
    category_counts, word_counts = self.load_data(input_file)
  File "predict.py", line 44, in load_data
    category, counts = job.parse_output_line(line)
  File "//anaconda/lib/python3.5/site-packages/mrjob/job.py", line 961, in 
      parse_output_line
  return self.output_protocol().read(line)
  File "//anaconda/lib/python3.5/site-packages/mrjob/protocol.py", line 84, in 
    read
         raw_key, raw_value = line.split(b'\t', 1)
  TypeError: Can't convert 'bytes' object to str implicitly
  </code></pre>