View Single Post
Old 02-04-2011, 10:14 AM   #57
kaleissin
Connoisseur
kaleissin ought to be getting tired of karma fortunes by now.kaleissin ought to be getting tired of karma fortunes by now.kaleissin ought to be getting tired of karma fortunes by now.kaleissin ought to be getting tired of karma fortunes by now.kaleissin ought to be getting tired of karma fortunes by now.kaleissin ought to be getting tired of karma fortunes by now.kaleissin ought to be getting tired of karma fortunes by now.kaleissin ought to be getting tired of karma fortunes by now.kaleissin ought to be getting tired of karma fortunes by now.kaleissin ought to be getting tired of karma fortunes by now.kaleissin ought to be getting tired of karma fortunes by now.
 
Posts: 71
Karma: 623136
Join Date: Jan 2011
Location: Norway
Device: Kindle Keyboard Wi-Fi, Kobo Glo
Arrow

Quote:
Originally Posted by mchunkat View Post
Code:
Traceback (most recent call last):
  File "tab2opf.py", line 240, in <module>
    dt, dd =  r.split('\t',1)
ValueError: need more than 1 value to unpack
This is telling you that (at least) one line in the file does not contain a tab. It attempts to split the string r once (1) on tab (\t) but fails, and thus can't fill (unpack to) the two "buckets" dt and dd.

Check if there is an empty line anywhere (check at the end!), or one with just a description but no keyword, or just a keyword but no description.

(Disclaimer: Python is my "native" programming language).
kaleissin is offline   Reply With Quote