0
 from sys import argv

 script, first, second, third = argv

 print('The script is called'), 'script'
 print('The first varrible is'), 'first'
 print('The second varrible is'), 'second'
 print('The Third Varrible is'), 'third'

It keeps prompting This Value Error in Spyder

MasonBitByte
  • 33
  • 1
  • 7

2 Answers2

0

Yes, I came across this problem at first as well. I used Command to run the code from Notepad+.

C:\Users\kxyde>Desktop\Python\ex13.py This command is wrong, since you need three values, you have to type in three after "ex13.py" (Shown below is the right one) :

C:\Users\kxyde>Desktop\Python\ex13.py first 2nd 3rd

Then, problem solved!!

-1

Solution 1

You could also decide to add the other three arguments in command prompt when trying to view the output, as shown here ---> How to add the three other arguments

Note

Do remember that

"c:\Users\Empress\Desktop\mystuff\ex3.py"

is where the location of my python file is and it had to be entered inorder to get the output of my editied code in the python file.

Hope that helps.