Author Topic: IndexError: list index out of range  (Read 3624 times)

0 Members and 1 Guest are viewing this topic.

Offline tara

  • Heavy QuantumATK user
  • ***
  • Posts: 37
  • Country: in
  • Reputation: 0
    • View Profile
IndexError: list index out of range
« 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  ??

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: IndexError: list index out of range
« Reply #1 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