[yt-dev] Issue #612: Reloading an athena dataset leads to corruption. (yt_analysis/yt)

Nathan Goldbaum issues-reply at bitbucket.org
Mon Jul 29 16:39:35 PDT 2013


New issue 612: Reloading an athena dataset leads to corruption.
https://bitbucket.org/yt_analysis/yt/issue/612/reloading-an-athena-dataset-leads-to

Nathan Goldbaum:

I'm using a 2D orszag tang dataset to test this.  The failing script is here:


```
#!python

from yt.mods import *
fns = sorted(glob.glob('OrszagTang.????.vtk'))
fn = fns[0]
#fn = '/home/goldbaum/tar_files/IsolatedGalaxy/galaxy0030/galaxy0030'

pf = load(fn)
slc = SlicePlot(pf, 2, 'Density')
slc.save()

pf = load(fn)
slc = SlicePlot(pf, 2, 'Density')
slc.save()
```

This produces the following traceback:


```
#!python

Traceback (most recent call last):
  File "test.py", line 15, in <module>
    slc.save()
  File "/home/goldbaum/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 1091, in save
    names.append(v.save(n,mpl_kwargs))
  File "/home/goldbaum/yt-x86_64/src/yt-hg/yt/visualization/base_plot_types.py", line 70, in save
    canvas.print_figure(name, **mpl_kwargs)
  File "/home/goldbaum/yt-x86_64/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2096, in print_figure
    **kwargs)
  File "/home/goldbaum/yt-x86_64/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 492, in print_png
    FigureCanvasAgg.draw(self)
  File "/home/goldbaum/yt-x86_64/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 435, in draw
    self.renderer = self.get_renderer()
  File "/home/goldbaum/yt-x86_64/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 454, in get_renderer
    self.renderer = RendererAgg(w, h, self.figure.dpi)
  File "/home/goldbaum/yt-x86_64/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 85, in __init__
    self._renderer = _RendererAgg(int(width), int(height), dpi, debug=False)
ValueError: cannot convert float NaN to integer
```

When I switch out the athena dataset for the enzo IsolatedGalaxy dataset, I get no crash, so I think this has to be an issue with the athena frontend.  I will try to dive in and fix this tonight, but if @samskillman, @jzuhone, or @MatthewTurk have any idea where the error might be, I'd love to hear your thoughts.





More information about the yt-dev mailing list