← 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

    Status: Open => Answered

Chareyre proposed the following answer:
Hi, please provide a script, not a code fragment.
Regards
Bruno

Le sam. 30 mai 2020 05:31, zyz <question691048@xxxxxxxxxxxxxxxxxxxxx> a
écrit :

> New question #691048 on Yade:
> https://answers.launchpad.net/yade/+question/691048
>
> Hello,all
> I am using Ubuntu 16.04LTS, and Yade 20200519-3889~fb69be8~xenial1 using
> python version: 3.5.2.
> 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.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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