ValueError: Too Many Values to Unpack Aptana Studio 3
Question: I am working on exercise 13 from learnpythonthehardway.org. I should run this
code:

    
    
    from sys import argv
    script, first, second, third = argv
    
    print "The script is called:", script
    print "Your first variable is:", first
    print "Your second variable is:", second
    print "Your third variable is:", third
    

Then enter "python ex13.py first 2nd 3rd" on command line and should output:

    
    
    The script is called: ex13.py
    Your first variable is: first
    Your second variable is: 2nd
    Your third variable is: 3rd 
    

However, I am using Aptana Studio 3 on Vista and I get the "ValueError: too
many values to unpack" error.

I am new to Python and Aptana so how can I enter the separate arguments here?


Answer: It's because `len(argv)` might be greater than 4:

    
    
    >>> w,x,y,z=[1,2,3,4,5]
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ValueError: too many values to unpack
    

Try printing `argv` to see what `argv` actually contains.

