> Hmm, well I have counted the fields in the CSV and verified there are
> only 11. Here is the offending code:
>
>
....
Try this instead:
lineno = 0
for values in csvreader:
try:
lineno += 1
boxid, mac, activated, hw_ver, sw_ver, heartbeat, name,
address,phone, country, city = values
except:
print "Problem at line #",lineno
print repr(values)
break
Or even:
lineno = 0
for values in csvreader:
lineno += 1
if len(values) != 11:
print "Problem at line #",lineno
print repr(values)
Best,
Laszlo
--
http://mail.python.org/mailman/listinfo/python-list