Hi, all-- I have a set of clumps that I've pickled to disk, now I've unpickled them and I'm trying to get some particle info. When I try to access the particle indices from the clump (in the error message, it's c1) it throws the following error. I do the same thing again, and it works fine (that is, access particle_index on the same c1, returns a reasonable looking particle list) I'm probably doing something dumb, do any of y'all see what it is? Thanks, d. File "p19_check_missing2.py", line 15, in <module> ind1 = c1['particle_index'] File "/Users/dccollins/yt2.0/DaveClump.py", line 80, in __getitem__ return self.data[request] File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/data_containers.py", line 327, in __getitem__ self.get_data(key) File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/data_containers.py", line 2525, in get_data self.particles.get_data(field) File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/particle_io.py", line 62, in get_data if len(fields) == 1: return rvs[0] TypeError: 'NoneType' object is not subscriptable -- Sent from my computer.
Hi Dave,
Last I remembered, particle reading from clumps shouldn't work; that
being siad, I am surprised that two subsequent calls do or do not
return particles or throw different errors. To be clear, you're doing
something like:
1) unpickle
2) read particles, get error
3) read particles, get particles
Right?
-Matt
On Tue, Sep 18, 2012 at 1:51 PM, david collins
Hi, all--
I have a set of clumps that I've pickled to disk, now I've unpickled them and I'm trying to get some particle info. When I try to access the particle indices from the clump (in the error message, it's c1) it throws the following error. I do the same thing again, and it works fine (that is, access particle_index on the same c1, returns a reasonable looking particle list) I'm probably doing something dumb, do any of y'all see what it is?
Thanks, d.
File "p19_check_missing2.py", line 15, in <module> ind1 = c1['particle_index'] File "/Users/dccollins/yt2.0/DaveClump.py", line 80, in __getitem__ return self.data[request] File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/data_containers.py", line 327, in __getitem__ self.get_data(key) File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/data_containers.py", line 2525, in get_data self.particles.get_data(field) File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/particle_io.py", line 62, in get_data if len(fields) == 1: return rvs[0] TypeError: 'NoneType' object is not subscriptable
-- Sent from my computer. _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Last I remembered, particle reading from clumps shouldn't work; that
Oh yeah. That would explain my screwy answers. That's a dumb mistake on my part, sorry about that.
1) unpickle 2) read particles, get error 3) read particles, get particles
Right?
Yeah, that's exactly right. So I guess my question is now, what is it actually returning? I'll poke around and report back if I make sense of it.
-Matt
On Tue, Sep 18, 2012 at 1:51 PM, david collins
wrote: Hi, all--
I have a set of clumps that I've pickled to disk, now I've unpickled them and I'm trying to get some particle info. When I try to access the particle indices from the clump (in the error message, it's c1) it throws the following error. I do the same thing again, and it works fine (that is, access particle_index on the same c1, returns a reasonable looking particle list) I'm probably doing something dumb, do any of y'all see what it is?
Thanks, d.
File "p19_check_missing2.py", line 15, in <module> ind1 = c1['particle_index'] File "/Users/dccollins/yt2.0/DaveClump.py", line 80, in __getitem__ return self.data[request] File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/data_containers.py", line 327, in __getitem__ self.get_data(key) File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/data_containers.py", line 2525, in get_data self.particles.get_data(field) File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/particle_io.py", line 62, in get_data if len(fields) == 1: return rvs[0] TypeError: 'NoneType' object is not subscriptable
-- Sent from my computer. _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Sent from my computer.
On Tue, Sep 18, 2012 at 4:48 PM, David Collins
Last I remembered, particle reading from clumps shouldn't work; that
Oh yeah. That would explain my screwy answers. That's a dumb mistake on my part, sorry about that.
1) unpickle 2) read particles, get error 3) read particles, get particles
Right?
Yeah, that's exactly right. So I guess my question is now, what is it actually returning? I'll poke around and report back if I make sense of it.
My guess is that it will be returning all the particles that belong to the parent-of-the-clump object. The fix for this is a bit longer term, but it's on the agenda. I think we can get particles in clumps. But it will need the geometry stuff that's going on in 3.0. -Matt
-Matt
On Tue, Sep 18, 2012 at 1:51 PM, david collins
wrote: Hi, all--
I have a set of clumps that I've pickled to disk, now I've unpickled them and I'm trying to get some particle info. When I try to access the particle indices from the clump (in the error message, it's c1) it throws the following error. I do the same thing again, and it works fine (that is, access particle_index on the same c1, returns a reasonable looking particle list) I'm probably doing something dumb, do any of y'all see what it is?
Thanks, d.
File "p19_check_missing2.py", line 15, in <module> ind1 = c1['particle_index'] File "/Users/dccollins/yt2.0/DaveClump.py", line 80, in __getitem__ return self.data[request] File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/data_containers.py", line 327, in __getitem__ self.get_data(key) File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/data_containers.py", line 2525, in get_data self.particles.get_data(field) File "/Users/dccollins/local2/src/yt-hg/yt/data_objects/particle_io.py", line 62, in get_data if len(fields) == 1: return rvs[0] TypeError: 'NoneType' object is not subscriptable
-- Sent from my computer. _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Sent from my computer. _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
david collins
-
David Collins
-
Matthew Turk