← Back to team overview

yade-users team mailing list archive

Re: [Question #691048]: nameerror

 

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

Description changed to:
Hello,all
I am using Ubuntu 16.04LTS, and Yade 20200519-3889~fb69be8~xenial1 using python version: 3.5.2.
I'm a beginner. I'm having some trouble with my studies, which is in  Documentation » Tutorial » Setting up a simulation » Parametric studies. The links is https://yade-dem.org/doc/tutorial-geo.html
When I execute the following code, it will  continuously prompt a same error.  Thank you very much for your help.
-------------------------------------------------------------
utils.readParamsFromTable(damping=.2)
from yade.params import table
NewtonIntegrator(damping=table.damping),
O.engines+=[PyRunner(iterPeriod=1000,command='checkUnbalancedForce()')]
def checkUnbalancedForce():
        if utils.unbalancedForce<0.05:
        utils.saveDataTxt(O.tags['d.id']+'.data.bz2')
        import sys
        sys.exit(0)
O.run()
-------------------------------------------------------------
NameError                                                                 Traceback(most recent call last)
/usr/bin/yadedaily in <module>()
NameError: name'checkUnbalancedForce' is not defined
--------------------------------------------------------------
NameError                                                                 Traceback(most recent call last)
/usr/bin/yadedaily in <module>()
NameError: name'checkUnbalancedForce' is not defined
--------------------------------------------------------------
NameError                                                                 Traceback(most recent call last)
/usr/bin/yadedaily in <module>()
NameError: name'checkUnbalancedForce' is not defined

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.