[yt-dev] Issue #751: PhasePlot is broken in 3.0 (yt_analysis/yt)
Nathan Goldbaum
issues-reply at bitbucket.org
Fri Dec 13 10:26:55 PST 2013
New issue 751: PhasePlot is broken in 3.0
https://bitbucket.org/yt_analysis/yt/issue/751/phaseplot-is-broken-in-30
Nathan Goldbaum:
I cannot create PhasePlots in 3.0. The same command works fine in the current stable release.
Here is the traceback I'm seeing:
```
#!python traceback
TypeError Traceback (most recent call last)
<ipython-input-7-db8ac28b5d75> in <module>()
----> 1 plot = PhasePlot(dd, "CellMassMsun", "Radius", "Height")
/home/goldbaum/yt-hg/yt/visualization/profile_plotter.pyc in __init__(self, data_source, x_field, y_field, z_fields, weight_field, x_bins, y_bins, accumulation, fractional, profile, fontsize, font_color, figure_size)
543 weight_field = weight_field,
544 accumulation=accumulation,
--> 545 fractional=fractional)
546 self.profile = profile
547 ImagePlotContainer.__init__(self, data_source, profile.field_data.keys(),
/home/goldbaum/yt-hg/yt/data_objects/profiles.pyc in create_profile(data_source, bin_fields, n, weight_field, fields, accumulation, fractional)
998 setattr(obj, "fractional", fractional)
999 if fields is not None:
-> 1000 obj.add_fields(fields)
1001 for field in fields:
1002 if fractional:
/home/goldbaum/yt-hg/yt/data_objects/profiles.pyc in add_fields(self, fields)
758 fields = ensure_list(fields)
759 temp_storage = ProfileFieldAccumulator(len(fields), self.size)
--> 760 for g in parallel_objects(self.data_source._grids):
761 self._bin_grid(g, fields, temp_storage)
762 self._finalize_storage(fields, temp_storage)
/home/goldbaum/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.pyc in parallel_objects(objects, njobs, storage, barrier, dynamic)
431 # If our objects object is slice-aware, like time series data objects are,
432 # this will prevent intermediate objects from being created.
--> 433 oiter = itertools.islice(enumerate(objects), my_new_id, None, njobs)
434 for obj_id, obj in oiter:
435 result_id = obj_id * njobs + my_new_id
TypeError: 'NoneType' object is not iterable
```
Looking at the traceback, the issue seems to be that the profile code expects there to be a `_grids` attribute attached to data sources.
More information about the yt-dev
mailing list