woo

Errors on cyl-triax test example

Asked by Henry

Dear all,
   when I run the cal-triax test example, there are some errors :
  "---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/usr/bin/woo in <module>()
      7 if __name__ == '__main__':
      8 sys.exit(
----> 9 load_entry_point('woo==0.99-3584-21-openmp-ubuntu14.04.1', 'console_scripts', 'woo')()
     10 )

/usr/lib/python2.7/dist-packages/wooMain.pyc in main(sysArgv)
    317 ### otherwise Qt4 might crash at this point
    318 #import woo.qt # this handles all Qt imports
--> 319 ipythonSession(opts,qt4=True,qapp=woo.qt.wooQApp,qtConsole=woo.qt.useQtConsole)
    320 #woo.master.exitNoBacktrace()
    321 # uninstall crash handlers

/usr/lib/python2.7/dist-packages/wooMain.pyc in ipythonSession(opts, qt4, qapp, qtConsole)
    370 sys.stderr.write("Using preprocessor "+arg0+'\n')
    371 import woo.batch
--> 372 woo.master.scene=woo.batch.runPreprocessor(obj,arg0)
    373 woo.master.scene.saveTmp()
    374 else:

/usr/lib/python2.7/dist-packages/woo/batch.pyc in runPreprocessor(pre, preFile)
    584
    585 # just run preprocessor in this case
--> 586 if not inBatch(): return pre()
    587
    588 import os

/usr/lib/python2.7/dist-packages/woo/pre/cylTriax.pyc in __call__(self)
     67 def __call__(self):
     68 # preprocessor builds the simulation when called
---> 69 return prepareCylTriax(self)
     70
     71

/usr/lib/python2.7/dist-packages/woo/pre/cylTriax.pyc in prepareCylTriax(pre)
    191 mass=nodeMass,inertia=nodeInertia*Vector3(1,1,1),
    192 suppMat=S.lab.suppMat,sideMat=S.lab.memMat,
--> 193 sideThick=pre.memThick,
    194 )
    195 S.lab.cylNodes=nodes

/usr/lib/python2.7/dist-packages/woo/pre/cylTriax.pyc in mkFacetCyl(aabb, cylDiv, suppMat, sideMat, suppMask, sideMask, suppBlock, sideBlock, sideThick, mass, inertia)
    121 return ret
    122 for i in range(0,len(nnn)-1):
--> 123 retParticles+=mkAround(nnn[i],nnn[i+1],mask=sideMask,mat=sideMat,halfThick=.5*sideThick)
    124 for p in retParticles: p.shape.wire=True
    125 import itertools

/usr/lib/python2.7/dist-packages/woo/pre/cylTriax.pyc in mkAround(nnAC, nnBD, mask, mat, halfThick)
    116 for i in range(len(nnAC)):
    117 A,B,C,D=nnAC[i],nnBD[i],nnAC[(i+1)%len(nnAC)],nnBD[(i+1)%len(nnBD)]
--> 118 ret+=[woo.dem.Particle(material=mat,shape=Membrane(nodes=fNodes,halfThick=halfThick),mask=mask) for fNodes in ((A,B,D),(A,D,C))]
    119 for n in (A,B,D): n.dem.addParRef(ret[-2])
    120 for n in (A,D,C): n.dem.addParRef(ret[-1])

NameError: global name 'Membrane' is not defined

The version of Woo is "0.99+3584+21~openmp~ubuntu14.04.1".

Thanks a lot!
Best regard,
Henry

Question information

Language:
English Edit question
Status:
Solved
For:
woo Edit question
Assignee:
No assignee Edit question
Solved by:
Henry
Solved:
Last query:
Last reply:
Revision history for this message
Václav Šmilauer (eudoxos) said :
#1

Hi Henry, this is a regression; I fixed it in rev 3585, which I just uploaded to LP. As usual, it may take a few hours before the package is available for installation. Sorry for inconveniences. Cheers, Vaclav

Revision history for this message
Henry (wenjiexu) said :
#2

Dear Václav ,
   There are still some errors. Thanks a lot!

~/Exe/woo$ woo cyl-triax-clumps.preprocessor
Welcome to Woo ver. 0.99+3585+21~ubuntu14.04.1
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/wooMain.py", line 361, in ipythonSession
    obj=woo.core.Object.load(arg0)
  File "/usr/lib/python2.7/dist-packages/woo/_monkey/io.py", line 429, in Object_load
    return typeChecked(wooExprEval(buf),typ)
  File "/usr/lib/python2.7/dist-packages/woo/_monkey/io.py", line 354, in wooExprEval
    return eval(__e)
  File "<string>", line 26, in <module>
  File "/usr/lib/python2.7/dist-packages/woo/pre/cylTriax.py", line 67, in __init__
    self.wooPyInit(self.__class__,woo.core.Preprocessor,**kw)
  File "/usr/lib/python2.7/dist-packages/woo/pyderived.py", line 337, in wooPyInit
    if not hasattr(self,k): raise AttributeError('No such attribute: %s'%k)
AttributeError: No such attribute: pWaveSafety
Error loading file (wrong format?) cyl-triax-clumps.preprocessor

Best regard,
Henry

Revision history for this message
Henry (wenjiexu) said :
#3

Furthermore, errors exit for some other examples.

:~/Exe/woo$ woo membrane1.py
Welcome to Woo ver. 0.99+3585+21~ubuntu14.04.1
Running script membrane1.py
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/wooMain.py", line 348, in runScript
    execfile(script,globals())
  File "membrane1.py", line 65, in <module>
    IntraForce([In2_Membrane_ElastMat(thickness=.01,bending=False,bendThickness=.2),In2_Sphere_ElastMat()]),
NameError: name 'In2_Membrane_ElastMat' is not defined
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]

Thanks a lot !
Best regard,
Henry

Revision history for this message
Václav Šmilauer (eudoxos) said :
#4

Hi Henry, for the error in cyl-triax-clumps.preprocessor: I renamed pWaveSafety to dtSafety in the last revision, so change it by hand in the preprocessor file, it will work then.

For the error in membrane1.py, just put "from woo.fem import *" towards the beginning of the script, it will work again. I will commit the fix in the next revision. The same for membrane2.py, I just checked that one.

Thanks for reporting all that.

HTH, Vaclav

Revision history for this message
Henry (wenjiexu) said :
#5

Many thanks to Vaclav.

The problem has been solved.

Best regard,
Henry