QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: tara on February 25, 2015, 14:46

Title: IndexError: list index out of range
Post by: tara on February 25, 2015, 14:46
Sir
I want to read the device configuration and electrostatic difference potential and device density of states from a previous .nc file .
 As soon i run the simulation  i  get error -IndexError: list index out of range.
the pseudo-code i have given below
-----------------------------------------------------------------
device_configuration = nlread("/home/tara/.vnl/tara-p2/area-scaled/elongated-iv-scan.nc", object_id="gID000")[0]

potentials=nlread("/home/tara/.vnl/tara-p2/area-scaled/elongated-iv-scan.nc",object_id="edp0.0V")[0]

ddos = nlread("/home/tara/.vnl/tara-p2/area-scaled/elongated-iv-scan.nc",object_id="ddos0.0V")[0]
-----------------------------------------------------------------

what can be the  error due to  ???

2. In the p-n junction tutorial , the script for contour plot was given
http://quantumwise.com/images/Tutorials/p-n_junction/ddos_edp.py

what is fname = sys.argv[1] for  ??
Title: Re: IndexError: list index out of range
Post by: Anders Blom on February 25, 2015, 15:24
1. This means that the NC file does not contain the objects you try to read

2. Standard Python, please check
http://www.tutorialspoint.com/python/python_command_line_arguments.htm
http://www.pythonforbeginners.com/system/python-sys-argv