[yt-dev] Issue #825: Creating an all_data object does not generate the field_info object. (yt_analysis/yt)

Nathan Goldbaum issues-reply at bitbucket.org
Tue Apr 1 17:02:00 PDT 2014


New issue 825: Creating an all_data object does not generate the field_info object.
https://bitbucket.org/yt_analysis/yt/issue/825/creating-an-all_data-object-does-not

Nathan Goldbaum:

The following script and traceback illustrates the issue:


```
#!python

import yt

ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')

ad = ds.all_data()

print ad.quantities.total_mass()
```


```
  File "test.py", line 7, in <module>
    print ad.quantities.total_mass()
  File "/Users/goldbaum/Documents/yt-hg/yt/data_objects/derived_quantities.py", line 188, in __call__
    fi = self.data_source.pf.field_info
AttributeError: 'EnzoDataset' object has no attribute 'field_info'

```

Adding a call to ds.index before the call to the `total_mass` derived quantity eliminates the error.






More information about the yt-dev mailing list