yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #21049
Re: [Question #685237]: KeyError
Question #685237 on Yade changed:
https://answers.launchpad.net/yade/+question/685237
Status: Open => Answered
Jan Stránský proposed the following answer:
Hi,
> plot.saveDataTxt('./contact_info'+str(d)+'.txt',vars = ('e_e_e'))
here, the parentheses around ('e_e_e') has no effect and than the code is equal to
vars='e_e_e'
which is interpreted as ('e','_','e','_','e'), the original string split to letters.
Use
vars=['e_e_e'] # list, no comma needed (see below)
or
vars=('e_e_e',) # note the comma, this way it is a tuple with 1 element
cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.