<div dir="ltr">Inspecting the stack trace with pdb reveals that fname is 'particle_mass'.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 1, 2014 at 4:56 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nathan,<br>
<br>
Weird.  I think this is probably related to at some point guessing the<br>
field type; you'll note that it comes from _determine_fields, which<br>
will call _get_field_info with "unknown".  If it can't figure out what<br>
it is (it defaults to the last type found) it throws the error.  Can<br>
you check what the fname is?<br>
<br>
-Matt<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Apr 1, 2014 at 7:55 PM, Nathan Goldbaum<br>
<<a href="mailto:issues-reply@bitbucket.org">issues-reply@bitbucket.org</a>> wrote:<br>
> New issue 824: Field detection issue when recreating data objects<br>
> <a href="https://bitbucket.org/yt_analysis/yt/issue/824/field-detection-issue-when-recreating-data" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/824/field-detection-issue-when-recreating-data</a><br>
><br>
> Nathan Goldbaum:<br>
><br>
> I ran into this when using a notebook.  I found that when I re-ran a cell that creates a data object and then calculates a derived quantity, I get a field detection error the *second* time I run the cell.<br>
><br>
> The following script exposes the buggy behavior: <a href="http://paste.yt-project.org/show/4462/" target="_blank">http://paste.yt-project.org/show/4462/</a><br>
><br>
> When run using the current experimental bookmark I get the following output and traceback:<br>
><br>
><br>
> ```<br>
> goldbaum at ROUS in ~<br>
> ○ python test.py<br>
> [8.15217983473e+49 g, 0.833333333333 code_mass]<br>
> Traceback (most recent call last):<br>
>   File "test.py", line 21, in <module><br>
>     print ad.quantities.total_mass()<br>
>   File "/Users/goldbaum/Documents/yt-hg/yt/data_objects/derived_quantities.py", line 194, in __call__<br>
>     rv = super(TotalMass, self).__call__(fields)<br>
>   File "/Users/goldbaum/Documents/yt-hg/yt/data_objects/derived_quantities.py", line 163, in __call__<br>
>     rv = super(TotalQuantity, self).__call__(fields)<br>
>   File "/Users/goldbaum/Documents/yt-hg/yt/data_objects/derived_quantities.py", line 59, in __call__<br>
>     sto.result = self.process_chunk(ds, *args, **kwargs)<br>
>   File "/Users/goldbaum/Documents/yt-hg/yt/data_objects/derived_quantities.py", line 169, in process_chunk<br>
>     for field in fields]<br>
>   File "/Users/goldbaum/Documents/yt-hg/yt/data_objects/data_containers.py", line 205, in __getitem__<br>
>     f = self._determine_fields([key])[0]<br>
>   File "/Users/goldbaum/Documents/yt-hg/yt/data_objects/data_containers.py", line 464, in _determine_fields<br>
>     raise YTFieldTypeNotFound(ftype)<br>
> yt.utilities.exceptions.YTFieldTypeNotFound: Could not find field 'all'.<br>
> ```<br>
><br>
><br>
><br>
> _______________________________________________<br>
> yt-dev mailing list<br>
> <a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
</div></div></blockquote></div><br></div>