This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

meaning of Sys.argv[1]

0 votes

Hi,
I was running the d6_p2D.py example on MAC and getting the following error message:

Traceback (most recent call last):
File "/research/Other/FEniCS/d6_p2D.py", line 107, in
degree = int(sys.argv[1])
IndexError: list index out of range

I am new to Python, could anybody help me out here. Am I missing a package or smth?
Thanks!

asked Sep 24, 2013 by Toha FEniCS Novice (140 points)

1 Answer

0 votes

The script expects at least one argument. Try with:

python d6_p2D.py 1
answered Sep 24, 2013 by johanhake FEniCS Expert (22,480 points)
...