title: ValueError: not enough values to unpack
body: <p>I am trying to learn (on Python3) how to do sentiment analysis for NLP and I am using the "UMICH SI650 - Sentiment Classification" Database available on Kaggle: <a href="https://www.kaggle.com/c/si650winter11" rel="nofollow noreferrer">https://www.kaggle.com/c/si650winter11</a></p>
  
  <p>At the moment I am trying to generate a vocabulary with some loops, here is the code:</p>
  
  <pre><code>    import collections
      import nltk
      import os
  
      Directory = "../Databases"
  
  
      # Read training data and generate vocabulary
      max_length = 0
      freqs = collections.Counter()
      num_recs = 0
      training = open(os.path.join(Directory, "train_sentiment.txt"), 'rb')
      for line in training:
          if not line:
              continue
          label, sentence = line.strip().split("\t".encode())
          words = nltk.word_tokenize(sentence.decode("utf-8", "ignore").lower())
          if len(words) &gt; max_length:
              max_length = len(words)
          for word in words:
              freqs[word] += 1
          num_recs += 1
      training.close()
  </code></pre>
  
  <p>I keep getting this error, that I don't fully understand:</p>
  
  <blockquote>
    <p>in  label, sentence = line.strip().split("\t".encode())
    ValueError: not enough values to unpack (expected 2, got 1)</p>
  </blockquote>
  
  <p>I tried to add     </p>
  
  <pre><code>if not line:
          continue
  </code></pre>
  
  <p>like suggested in here: <a href="https://stackoverflow.com/questions/45270021/valueerror-not-enough-values-to-unpack-why">ValueError : not enough values to unpack. why?</a>
  But it didn't work for my case. How can I solve this error? </p>
  
  <p>Thanks a lot in advance,</p>