Understanding "Not enough values"

I try to run exercise 13 and I keep getting an error message: Line
4, in
script, first, second, third = argv
ValueError: Not enough values to unpack. <expected 4, got 1>

I’ve added variables, numerical values, and everything I can think of to make it run correctly. Help please.

@evansdarryl3
crystal ball a bit cloudy at the mo:grin:, gonna need some help, maybe something along the lines of code and command line arguments.

taking a guess from the error, you only typed ‘python ex13.py’ and not ‘python ex13.py first 2nd 3rd’ but only a guess, we can’t see what your doing, to help you

jason

The code appears to be telling me that I’m not including enough values.

It seems anything dealing with argv has an error of not having enough values to unpack.

Here is a screenshot of running .\ex13.py using the prompt.

@evansdarryl3
thanks for the screenshots, the last one nailed it.
page 43 of LPTHW says to pay close attention to the way Zed is running it ie 'python3.6 ex13.py first 2nd 3rd ’ or in your case you need to be typing ‘.\ex13.py first 2nd 3rd’

1 Like

Thank’s! sorry I need to pay mere attention.

1 Like