Forums
Hi,
When I try to import VTK format data using pizza.py, I get following error:
==================================================================
> d=("dump.cohesion")
> v=vtk(d)
> v.manyGran()
Traceback (most recent call last):
File "", line 1, in
File "/home/mksingh/Projects/GRANULAR/DEM/PIZZA/gran_pizza_17Aug10/src/vtk.py", line 158, in manyGran
which,time,flag = self.data.iterator(flag)
AttributeError: 'str' object has no attribute 'iterator'
===================================================
I do not know how to resolve this issue.
With best regards.
M K Singh
Re: Regarding pizza post processing
Hi MK,
hard to say without further information. Are you using the most current versions of both LIGGGHTS and pizza?
What comes up immediately after you type 'pizza' in the terminal - are there any errors/warnings?
Best regards,
Christoph
In reply to by anonymous_stub (not verified)
Re: Re:Regarding pizza post processing
Hi Christoph,
When I type pizza, I get the following:
pizza
==============================================================
Pizza.py (1 Oct 2006), a toolkit written in Python
type ? for help, CTRL-D to quit
Loading tools ...
Display not available ... no GUIs
animate tool did not load:
No module named _tkinter
plotview tool did not load:
No module named _tkinter
gl tool did not load:
No module named OpenGL.Tk
vcr tool did not load:
No module named _tkinter
mdump tool did not load:
No module named Numeric
image tool did not load:
No module named _tkinter
dump tool did not load:
No module named Numeric
>
============================================================
Indeed I use your gran_pizza_17Aug10 version. I hope I am not making error here.
Thanks in advance.
With best regards.
M K
In reply to by anonymous_stub (not verified)
Re:
>>Indeed I use your gran_pizza_17Aug10 version. I hope I am not making error here.
Well, I think you are doing nothing wrong. But you need either Numeric or numpy Python packages, it seems that your system is missing it. I'm not 100% sure if this will resolve it, but try installing numpy - see here for more info
Best regards,
Christoph
In reply to by anonymous_stub (not verified)
After installing numpy also has same problem
Hi, I installed numpy, and run numpy examples on python without problem. But still can't go pass d=dump.
I also download the newest gran_pizza version, still has the same problem reading dump file, with
d=dump(dump.***)
Error: Class dump has no attribute ***.
I browsed through the posts, this seems common, but all appear have been solved.
Share experience? Much appreciated.
In reply to by anonymous_stub (not verified)
Could you post exactly what
Could you post exactly what you're typing into pizza - your example above
d=("dump.cohesion")is not a valid pizza command. To load a dump file (e.g. dump.cohesion) you use:
d=dump("dump.cohesion")This should load in all of the data into python, where you can process it as you need, or dump to vtk files with something like:
vtk(d).manyGran("cohesion")which will convert all timesteps in the dump file into VTK files with the prefix cohesion - you can then load these into ParaView, for example.
Regards, Mark
In reply to by anonymous_stub (not verified)
it worked
I installed both numpy and Numeric.
But d=dump(dump.**) does not work
d=dump("dump.**") does work and displayed snapshots data on screen.
Thanks.