← Back to team overview

yade-dev team mailing list archive

[Bug 416906] Re: some scripts possibly not compatible with python 2.5

 

ok, I tried them all. Only two seem to produce errors:

rb.py:

INFO  /home/janek/tmp/ZZ/yade/core/yade.cpp:266 main: Loading /home/janek/.yade-ZZ-test-fast/preferences.xml
INFO  /home/janek/tmp/ZZ/yade/core/yade.cpp:268 main: Loading plugins
INFO  gui/qt3/YadeQtMainWindow.cpp:64 YadeQtMainWindow: Loading configuration file: /home/janek/.yade-ZZ-test-fast/QtGUIPreferences.xml.
Python TCP server listening on localhost:9001, auth cookie is `kuadse'
/usr/lib/python2.5/site-packages/pytz/__init__.py:32: UserWarning: Module dateutil was already imported from /usr/lib/pymodules/python2.5/dateutil/__init__.py, but /usr/lib/pymodules/python2.5 is being added to sys.path
  from pkg_resources import resource_stream
Traceback (most recent call last):
  File "/home/janek/tmp/ZZ/BIN/lib/yade-ZZ-test-fast/gui/PythonUI_rc.py", line 128, in <module>
    execfile(runtime.script)
  File "../../yade/examples/concrete/uniaxial/rb.py", line 66, in <module>
    spheres=pack.triaxialPack(pack.inHyperboloid((0,0,-.5*specimenLength),(0,0,.5*specimenLength),.25*specimenLength,.2*specimenLength),radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',young=young,poisson=poisson,frictionAngle=frictionAngle,physParamsClass='CpmMat',density=density)
  File "/home/janek/tmp/ZZ/BIN/lib/yade-ZZ-test-fast/py/yade/pack.py", line 228, in triaxialPack
    if type(predicate)==inGtsSurface and useOBB:
NameError: global name 'inGtsSurface' is not defined


interpolating-force.py:

INFO  /home/janek/tmp/ZZ/yade/core/yade.cpp:266 main: Loading /home/janek/.yade-ZZ-test-fast/preferences.xml
INFO  /home/janek/tmp/ZZ/yade/core/yade.cpp:268 main: Loading plugins
INFO  gui/qt3/YadeQtMainWindow.cpp:64 YadeQtMainWindow: Loading configuration file: /home/janek/.yade-ZZ-test-fast/QtGUIPreferences.xml.
Python TCP server listening on localhost:9001, auth cookie is `csakud'
/usr/lib/python2.5/site-packages/pytz/__init__.py:32: UserWarning: Module dateutil was already imported from /usr/lib/pymodules/python2.5/dateutil/__init__.py, but /usr/lib/pymodules/python2.5 is being added to sys.path
  from pkg_resources import resource_stream
Running script ../../yade/scripts/test/interpolating-force.py
INFO  /home/janek/tmp/ZZ/yade/core/Omega.cpp:270 saveSimulation: Saving file :memory:
INFO  gui/qt3/GLViewer.cpp:368 centerScene: Less than 500 bodies, moving possible. Select with shift, press 'm' to move.
INFO  pkg/common/RenderingEngine/OpenGLRenderingEngine/OpenGLRenderingEngine.cpp:68 initgl: (re)initializing GL for gldraw methods.

Traceback (most recent call last):
  File "/home/janek/tmp/ZZ/BIN/lib/yade-ZZ-test-fast/gui/PythonUI_rc.py", line 128, in <module>
    execfile(runtime.script)
  File "../../yade/scripts/test/interpolating-force.py", line 68, in <module>
    yp.plot()
  File "/home/janek/tmp/ZZ/BIN/lib/yade-ZZ-test-fast/py/yade/plot.py", line 98, in plot
    pylab.figure()
  File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 260, in figure
    draw_if_interactive()
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py", line 61, in draw_if_interactive
    figManager.show()
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py", line 391, in show
    self.canvas.draw()
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py", line 215, in draw
    tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/tkagg.py", line 19, in blit
    tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, id(bbox_array))
TclError


for the sake of completeness see attached file.

zsh history:
91929  ./yade-ZZ-test-fast ../../yade/scripts/regression-tests.py > RESULT-regression-tests.py 2>&1
91930  cat RESULT-regression-tests.py
91931  ./yade-ZZ-test-fast ../../yade/examples/concrete/uniaxial/rb.py > RESULT-rb.py 2>&1
91932  ./yade-ZZ-test-fast ../../yade/scripts/test/clump.py > RESULT-clump.py 2>&1
91934  ./yade-ZZ-test-fast ../../yade/scripts/test/pack-cloud.py > RESULT-pack-cloud.py 2>&1
91935  ./yade-ZZ-test-fast ../../yade/scripts/test/pack-predicates.py > RESULT-pack-predicates.py 2>&1
91937  ./yade-ZZ-test-fast ../../yade/scripts/test/regular-sphere-pack.py > RESULT-regular-sphere-pack.py 2>&1
91939  ./yade-ZZ-test-fast ../../yade/scripts/test/interpolating-force.py > RESULT-interpolating-force.py 2>&1



** Attachment added: "results.tar.bz2"
   http://launchpadlibrarian.net/30640721/results.tar.bz2

-- 
some scripts possibly not compatible with python 2.5
https://bugs.launchpad.net/bugs/416906
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.

Status in Yet Another Dynamic Engine: New

Bug description:
Python 2.5 should be fully supported because it is in lenny, squeeze and hardy, which we want to support for 0.20. All scripts should be checked that they work with python 2.5. The initial report was use of itertools.product in yade.pack by Janek.



References