<div dir="ltr">Any chance you can elaborate on the failures you're seeing? Maybe a pastebin of a traceback?<div><br></div><div>What I've done in the past in a similar situation is wrap data access in a try/except block and catch the YTFieldNotFound error if a field doesn't exist in a dataset.</div><div><br></div><div>You can also check the particle counts in the dataset by looking at ds.particle_type_counts and then conditionally process particle fields if there are nonzero particle counts. I added ds.particle_type_counts recently, so it's only in the development version of yt and will be in yt 3.3.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 7, 2016 at 1:12 PM, JosĂ© Utreras <span dir="ltr"><<a href="mailto:jutreras@das.uchile.cl" target="_blank">jutreras@das.uchile.cl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi yt users,<br><br></div>I'm using a script to calculate things for cells and particles when needed. But I'm having the following problem:<br><br></div>- Each time I try to work with datasets that do not contain particles the particle fields  are loaded which results in an error. In my simulations some datasets have particles at the beginning and other at later times. Then it is not desirable to have different scripts for datasets with and without particles.<br><br></div><div>Is there a way to tell yt to not load field particles when particles are not present?<br><br></div><div>Best regards<br><br></div><div>Jose<br></div><div><br></div><div><div><div><br></div></div></div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>