[yt-users] particle read error

Matthew Turk matthewturk at gmail.com
Tue Sep 18 10:54:42 PDT 2012


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 <antpuncher at gmail.com> 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 at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org



More information about the yt-users mailing list