title: How to fix this 'ValueError: too many values to unpack'
body: <p>I'm trying to parse a large .tsv-File with <strong>500k</strong> rows into single <strong>.txt</strong> files for each row.
  My Script is now able to iterate till <strong>id 11533</strong>, then it stops and prints out following error:</p>
  <blockquote>
  <p>File &quot;goldfish.py&quot;, line 18, in  filename, text = prev_row</p>
  <p>ValueError: too many values to unpack</p>
  </blockquote>
  <p>My Script looks like that:</p>
  <pre><code>import csv
  import sys
  
  csv.field_size_limit(sys.maxsize)
  
  with open('id_descr.tsv', 'rb') as f:
  reader     = csv.reader(f, delimiter='\t')
  fieldnames = next(reader)
  
  prev_row = next(reader)
  
  for row in reader:
      if not row:
          continue
      if len(row) == 1 or not row[0].isdigit():
          prev_row[-1] += row[0]
      else:
          filename, text = prev_row
          filename = filename + &quot;.txt&quot;
          with open(filename, 'wb') as output:
              output.write(text)
              output.write('\n')
              prev_row = row
  </code></pre>
  <p>The Following <strong>.tsv</strong> file contain the last iterated row <strong>(id=11533)</strong> and the following row, which isn't parsed (thats the point where the script stops) <a href="https://www.dropbox.com/s/8mizthp8n0kduax/sample.tsv?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/8mizthp8n0kduax/sample.tsv?dl=0</a></p>
  <p>So my questions are:</p>
  <p>is there a way to ignore this kind of error,
  or how do I have to change the script to avoid this error?</p>