yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #14220
[Question #482400]: index out of range
New question #482400 on Yade:
https://answers.launchpad.net/yade/+question/482400
when i want to Import Yade in other Python applications, i do the command as https://www.yade-dem.org/doc/user.html#python-specialties-and-tricks:
$ cd /path/where/you/want/yadeimport
$ ln -s /path/to/yade/executable/yade-trunk yadeimport.py
then
import sys
sys.path.append('/path/where/you/want/yadeimport')
from yadeimport import *
but at this step, the error is "indexerror: index out of range"
the relevant lines are
"except ImportError: # argparse not present, print error message
raise RuntimeError("\n\nPlease install 'python-argparse' package.\n")
prog = os.path.basename(sys.argv[0])
par=argparse.ArgumentParser(usage='%s [options] [ simulation.xml[.bz2] | script.py [script options]]'%prog,
prog=prog,description="Yade: open-source platform for dynamic compuations. It\"
i think it may be induced by the sys.argv[0], but i don't know how to amend it.
--
You received this question notification because your team yade-users is
an answer contact for Yade.