Hi Piyush, OK -- I think the simplest solution *for now* would be to catch the exception in your loop. This isn't really a long term solution, but it should be able to get you to the next step. The longer term solution would be for yt to just return empty arrays -- that should allow you to query the metadata but not get the keyerrors. On Fri, Oct 27, 2023 at 4:07 AM <piyush.suneet@gmail.com> wrote:
Hi Matt,
Thanks for your response!
If I do h5ls -r on a particle file that has no particles, I get:
(base) RSAA-043527:Documents psharda$ h5ls -r FLASH_part_0003 / Group /integer\ runtime\ parameters Dataset {136} /integer\ scalars Dataset {17} /localnp Dataset {585} /logical\ runtime\ parameters Dataset {147} /logical\ scalars Dataset {2} /real\ runtime\ parameters Dataset {206} /real\ scalars Dataset {13} /sim\ info Dataset {1} /string\ runtime\ parameters Dataset {152} /string\ scalars Dataset {1} /unknown\ names Dataset {37, 1}
If I do the same on a particle file that has particles:
(base) RSAA-043527:Documents psharda$ h5ls -r FLASH_part_0044 / Group /integer\ runtime\ parameters Dataset {136} /integer\ scalars Dataset {17} /localnp Dataset {2753} /logical\ runtime\ parameters Dataset {147} /logical\ scalars Dataset {2} /particle\ names Dataset {37, 1} /real\ runtime\ parameters Dataset {206} /real\ scalars Dataset {13} /sim\ info Dataset {1} /string\ runtime\ parameters Dataset {152} /string\ scalars Dataset {1} /tracer\ particles Dataset {3, 37} /unknown\ names Dataset {37, 1} _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: matthewturk@gmail.com