Closed claytonstrawn closed 6 years ago
Sounds like I messed up a merge with upstream. Any chance you can share a dataset that triggers this?
Alternatively you could see if this triggers with one of the sample datasets at yt-project.org/data.
It looks like I'm not able to trigger this with any of the Gadget data I have available to me. @claytonstrawn any chance you can share a Gadget output that triggers this? You can use the yt curldrop to share files:
I uploaded a file called "snap_M1196_4x_320" to the curldrop which triggers this.
I tried running this code on the sample file "Gadget3-snap-format2" and it seemed to work at first, but after I played with the source code a little to see when it runs "_yield_coordinates" it had the same problem. Is "_yield_coordinates" called inside a try-except clause or something (so it was just ignored instead of throwing an error like I expected)? What's weird is that after that, I undid my changes and reinstalled yt with pip, and it did not go back to working correctly, so the loading might have saved some auxiliary file without that variable and isn't being overwritten when I load it again.
Edit: It works again after I delete the .ewah file, it looks like it is possible for that file to be created missing this "self._float_type" variable, and if it is, then future loads which use this .ewah file will have this error.
Can you share the link to the curldropped file? It should have printed the link when you finished uploading.
The file itself doesn't set the _float_type
attribute, but it's possible that there's a bug in how we restore the bitmap index that causes that attribute to not be set.
FWIW I'm unable to reproduce with Gadget3-snap-format2
both with and without a .ewah
file existing on-disk.
Oh I see, I didn't realize what that was. http://use.yt/upload/e7aade88
Actually it looks like even if I create the .ewah file correctly, I still get this error as soon as I try to load it a second time, so maybe it is not reading the values back out of it correctly.
OK, great, I'm able to reproduce with that file.
I've just pushed a fix. Thanks for the report! Please feel free to reopen the issue if you're still having trouble with this issue. If you are having unrelated issues, please open a new ticket.
Bug report
Bug summary
Function "_yield_coordinates" which sets "self._float_type" is never called in demeshened version of yt on binary gadget file, so it has a "no-attribute" error.
Code for reproduction
Claytons-MacBook-Pro:~ claytonstrawn$ iyt
In [1]: ds = yt.load("/Users/claytonstrawn/Desktop/astroresearch/code/sampledatasets/snaps/snap_M1196_4x_320") #some gadget file in binary
In [2]: SlicePlot(ds,1,"density")
Copy-paste of console:
This works on the stable version, but it's done so differently between meshed and demeshed that it's hard for me to understand where this function should be called.
Version Information installed the dev version, after demeshening as according to https://nbviewer.jupyter.org/url/trident-project.org/notebooks/trident_demesh_install.ipynb