← Back to team overview

yade-users team mailing list archive

Re: [Question #694513]: How to generate stress in PARAVIEW when the boulder dropped on the grains, and why my amount of grains model in PARAVIEW is not as much as in YADE simulation?

 

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

Robert Caulk proposed the following answer:
> 1. Based on my script (attachment on below), why I cannot run "readParamsFromTable" from my YADE script? it appeared like this on PARAVIEW when I run script:
Traceback (most recent call last):
  File "<string>", line 3, in <module>
NameError: name 'readParamsFromTable' is not defined

What should I do?

You should probably start with some python basics. NameError is a python
error, not a yade one. It means that python does not have any definition
of 'readParamsFromTable'. Or more explicitly:

name 'readParamsFromTable' is not defined

So you need to think about why it is not defined. To do that let's see
if I can introduce you to some python basics.

1/ importing libraries.

Python is library based, yade is essentially just a library to be
imported. Hence:

from yade.params.table import *
from yade import export
from yade import pack, plot

2/ the code is sequential.

Python reads your script line by line, top to bottom.

I hope the information I have provided is sufficient for you to
understand the problem on your own.

Cheers,

Robert

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