[yt-svn] [yt_analysis/yt] Lost parameter files, out-of-scope references (issue #417)
Anonymous
issues-reply at bitbucket.org
Fri Aug 10 11:04:11 PDT 2012
--- you can reply above this line ---
New issue 417: Lost parameter files, out-of-scope references
https://bitbucket.org/yt_analysis/yt/issue/417/lost-parameter-files-out-of-scope
Anonymous:
This (albiet bad) reference situation invalidates the object created. An easy way to re-assign the lost references would be handy.
import weakref
pf = load('/scratch/david_c/Paper4/d60_b02_4lev_j32/TD0000/time0000')
h = weakref.proxy(pf.h)
data=h.sphere([0.5]*3,0.05)
pf = load('/scratch/david_c/Paper4/d60_b02_4lev_j32/TD0001/time0001')
h = weakref.proxy(pf.h)
data['Density']
gives
Parsing Hierarchy100% ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Time: 00:00:00
Traceback (most recent call last):
File "tmp.py", line 8, in <module>
data['Density']
File "/usr/projects/magnetic/david_c/local/src/yt-hg/yt/data_objects/data_containers.py", line 305, in __getitem__
self.get_data(key)
File "/usr/projects/magnetic/david_c/local/src/yt-hg/yt/data_objects/data_containers.py", line 2331, in get_data
if field not in self.hierarchy.field_list and not in_grids:
ReferenceError: weakly-referenced object no longer exists
--
This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.
More information about the yt-svn
mailing list