some scripts possibly not compatible with python 2.5
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Yade |
Fix Released
|
Low
|
Unassigned |
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.
Changed in yade: | |
importance: | Undecided → Low |
milestone: | none → 0.20-0 |
Janek Kozicki (cosurgi) wrote : | #1 |
Václav Šmilauer (eudoxos) wrote : | #2 |
Hm, that wouldn't work, some of the scripts don't exit automatically etc.
Can you run by hand just a few?
scripts/
examples/
scripts/test: clump.py pack-cloud.py pack-predicates.py regular-
Most problems should be spotted this way, I guess.
Thanks.
Janek Kozicki (cosurgi) wrote : | #3 |
- results.tar.bz2 Edit (2.8 KiB, application/octet-stream)
ok, I tried them all. Only two seem to produce errors:
rb.py:
INFO /home/janek/
INFO /home/janek/
INFO gui/qt3/
Python TCP server listening on localhost:9001, auth cookie is `kuadse'
/usr/lib/
from pkg_resources import resource_stream
Traceback (most recent call last):
File "/home/
execfile(
File "../../
spheres=
File "/home/
if type(predicate)
NameError: global name 'inGtsSurface' is not defined
interpolating-
INFO /home/janek/
INFO /home/janek/
INFO gui/qt3/
Python TCP server listening on localhost:9001, auth cookie is `csakud'
/usr/lib/
from pkg_resources import resource_stream
Running script ../../yade/
INFO /home/janek/
INFO gui/qt3/
INFO pkg/common/
Traceback (most recent call last):
File "/home/
execfile(
File "../../
yp.plot()
File "/home/
pylab.figure()
File "/usr/lib/
draw_
File "/usr/lib/
figManager.
File "/usr/lib/
Janek Kozicki (cosurgi) wrote : | #4 |
the errors in interpolating-
Václav Šmilauer (eudoxos) wrote : | #5 |
1. Can you retry examples/
2. Can you try scripts/
Thanks
Janek Kozicki (cosurgi) wrote : | #6 |
in r1717 rb.py runs. I can see some spheres being compresses. Should I let it run for some time?
python-matplotlib version 0.98.3-5
It just worked when using GTKCairo - I can see two plots.
so maybe I would need to install some package to have it working with Tcl?
with QtAgg it segfaults, backtrace showing a problem with qt (and nothing useful at all):
(gdb) bt
#0 0x00007f0c1290f383 in QBoxLayout:
#1 0x00007f0c129102a0 in QBoxLayout:
#2 0x00007f0bd447ed19 in sipQHBoxLayout:
#3 0x00007f0c128cc81b in QLayout::activate () from /usr/lib/
#4 0x00007f0c128ccaea in QLayout:
#5 0x00007f0bd447f39b in sipQHBoxLayout:
#6 0x00007f0c12925972 in QObject:
#7 0x00007f0c129259c7 in QObject::event () from /usr/lib/
#8 0x00007f0c12956df3 in QWidget::event () from /usr/lib/
#9 0x00007f0bd45cca6b in sipQWidget::event () from /usr/lib/
#10 0x00007f0c128d0953 in QApplication:
#11 0x00007f0c128d162e in QApplication:
#12 0x00007f0c128d203a in QApplication:
#13 0x00007f0c128869dd in QEventLoop:
#14 0x00007f0c128e5001 in QEventLoop:
#15 0x00007f0c128e4eb2 in QEventLoop::exec () from /usr/lib/
#16 0x00007f0be23508c7 in QtGUI::run () from /home/janek/
#17 0x000000000047dcb7 in main ()
I need to leave for today. see you on monday, maybe sunday.
Václav Šmilauer (eudoxos) wrote : | #7 |
Oh yes, let run rb.py till the very end, it should report tensile/compressive strength, save the curve to gnuplot file and exit (much faster with the optimized build).
Janek Kozicki (cosurgi) wrote : | #8 |
- triaxPackCache.sqlite Edit (376.0 KiB, application/octet-stream)
OK, I let it run until the end... and it produced one file (in the attachment), and an error:
INFO pkg/dem/
Packing saved to the database /tmp/triaxPackC
Traceback (most recent call last):
File "/home/
execfile(
File "../../
bb=
File "/home/
dim=aabbDim(); axis=dim.
AttributeError: 'tuple' object has no attribute 'index'
File in the attachment.
Janek Kozicki (cosurgi) wrote : | #9 |
I didn't notice anywhere (I'm blind, or is that this 2.5 incompatibility problem): 1. tensile/compressive strength 2. curve in gnuplot file
Václav Šmilauer (eudoxos) wrote : | #10 |
Of course if you get error you are not going to get the results. What did you let run "to the end"? Be more patient. This compat issue with python 2.5 fixed in r1733.
Václav Šmilauer (eudoxos) wrote : | #11 |
Janek, I mean: try again, please.
Václav Šmilauer (eudoxos) wrote : | #12 |
You should get something like this at the end:
[...]
20090824T191100
20090824T191100
Damaged, stopping.
Strengths fc=-2.70021e+07, ft=3.34939e+06, |fc/ft|=8.06182
gnuplot 20090824T191100
Bye.
(you will have different values and the gnuplot plot might be a little bogus for concrete, but that is the public version of the CPM model).
Janek Kozicki (cosurgi) wrote : | #13 |
I will leave it running for the night. no problem at all :)
Janek Kozicki (cosurgi) wrote : | #14 |
The file examples/
Running script ../../yade/
/usr/lib/
from pkg_resources import resource_stream
/usr/lib/
from pkg_resources import resource_stream
Traceback (most recent call last):
File "/home/
execfile(
File "../../
spheres=
File "/home/
except OperationalError:
NameError: global name 'OperationalError' is not defined
Most strange that now it doesn't even start calculations. It errors before generating the sample. Let me know when to try again :)
Václav Šmilauer (eudoxos) wrote : | #15 |
Try with r1734 (wonder how this could have passed so far). The packing was already generated and saved in the memoizeDb, now it was trying to load it again.
Janek Kozicki (cosurgi) wrote : | #16 |
I bzr upped:
janek@atak:
M py/pack.py
All changes applied successfully.
Updated to revision 1734.
unfortunately the error is the same...:
Running script ../../yade/
/usr/lib/
from pkg_resources import resource_stream
/usr/lib/
from pkg_resources import resource_stream
Traceback (most recent call last):
File "/home/
execfile(
File "../../
spheres=
File "/home/
except OperationalError:
NameError: global name 'OperationalError' is not defined
Janek Kozicki (cosurgi) wrote : | #17 |
ooops, sorry false alarm. I forgot to run scons to install new version of this script, hold on.
Janek Kozicki (cosurgi) wrote : | #18 |
ok... so I installed new script. I forgot to set version=trunk so it was a full recompile ;) And now I get another error:
Running script ../../yade/
/usr/lib/
from pkg_resources import resource_stream
/usr/lib/
from pkg_resources import resource_stream
Traceback (most recent call last):
File "/home/
execfile(
File "../../
spheres=
File "/home/
raise RuntimeError(
RuntimeError: ('ERROR: database', '/tmp/triaxPack
So I deleted this file /tmp/triaxPackC
janek@atak:
INFO /home/janek/
INFO /home/janek/
INFO gui/qt3/
Python TCP server listening on localhost:9000, auth cookie is `sdycsk'
Running script ../../yade/
/usr/lib/
from pkg_resources import resource_stream
/usr/lib/
from pkg_resources import resource_stream
INFO pkg/common/
also in the OpenGL view I see it being compressed and some circles/
I'll let you know when it will finish.
Václav Šmilauer (eudoxos) wrote : | #19 |
OK, let me know. It shouldn't take terribly long, though, even the first time. The circles are spheres wrapping from the other side of the periodic cell (shown in yellow).
Janek Kozicki (cosurgi) wrote : | #20 |
I suppose that it works now:
janek@atak:
janek@atak:
INFO /home/janek/
INFO /home/janek/
INFO gui/qt3/
Python TCP server listening on localhost:9000, auth cookie is `sdycsk'
Running script ../../yade/
/usr/lib/
from pkg_resources import resource_stream
/usr/lib/
from pkg_resources import resource_stream
INFO pkg/common/
INFO extra/PeriodicI
INFO pkg/common/
INFO extra/PeriodicI
Packing saved to the database /tmp/triaxPackC
Timestep 1.2521980674e-06
INFO /home/janek/
init
init done, will now run.
INFO pkg/dem/
INFO pkg/dem/
INFO pkg/dem/
__ __ ____ ____ _
\ \ / /_ _| _ \ ___ / ___|___ _ __ ___ ___ | | ___
\ V / _` | | | |/ _ \ | | / _ \| '_ \/ __|/ _ \| |/ _ \
| | (_| | |_| | __/ | |__| (_) | | | \__ \ (_) | | __/
In [1]: 20090825T103420
20090825T103420
20090825T103420
20090825T103420
20090825T103420
20090825T103420
20090825T103420
20090825T103420
20090825T103420
20090825T103420
20090825T103420
20090825T103420
Václav Šmilauer (eudoxos) wrote : | #21 |
Cool, that's it. Thanks for testing. Closing.
Changed in yade: | |
status: | New → Fix Committed |
Changed in yade: | |
status: | Fix Committed → Fix Released |
since I have 2.5 here I can check this, just tell me which scripts should I run? All scripts from yade/scripts and yade/scripts/test and yade/examples ?
I can do it like this for example:
find -iname "*py" -exec yade {} \; > RESULT 2>&1