argv is a list:
>>> from sys import argv
>>> type(argv)
So you're attempting to do a conversion from a list to a tuple, which only works if the number of elements in the tuple exactly matches the list length:
>>> a,b,c = [1]
Traceback (most recent call last):
File "", line 1, in
ValueError: need more than 1 value to unpack
>>> a,b,c = [1,2]
Traceback (most recent call last):
File "", line 1, in
ValueError: need more than 2 values to unpack
>>> a,b,c = [1,2,3]
>>> a,b,c = [1,2,3,4]
Traceback (most recent call last):
File "", line 1, in
ValueError: too many values to unpack
So you need to add some checks on the argv length prior to attempting the conversion.