← Back to team overview

yade-users team mailing list archive

Re: [Question #270488]: Clumping

 

Question #270488 on Yade changed:
https://answers.launchpad.net/yade/+question/270488

Jan Stránský proposed the following answer:
Hi,


> 2- When I run the script , I face with this error " name 'checkUnbalanced'
> is not defined"
>

Python interpreter goes through the script file line by line and also
execute the lines one after another. When it is finished with line 15 it
goes and interpret line 16.. In your case, when you call O.step() for the
first time, the interpreter (as the error says) does not have any idea what
checkUnbalanced is (because the definition has not been done yet).

Just put O.step() at the end of the file and it should work :-)

cheers
Jan

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.