Hello yt users, I have tried to save a clump dataset but I'm getting the following error: *Code:* *...* *find_clumps(master_clump, cmin, cmax, step)* *fn=master_clump.save_as_dataset(fields=["cell_mass", "total","x","y","z","velocity_x","velocity_y","velocity_z"])* *print(fn)* *...* *Error* *yt : [INFO ] 2017-09-22 10:34:12,164 Saving field data to yt dataset: G-0001_clump_0.h5.* *Traceback (most recent call last):* * File "Save_Clumps.py", line 43, in <module>* * master_clump.save_as_dataset(fields=["cell_mass", "total","x","y","z","velocity_x","velocity_y","velocity_z"])* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/analysis_modules/level_sets/clump_handling.py", line 365, in save_as_dataset* * extra_attrs=extra_attrs)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/frontends/ytdata/utilities.py", line 149, in save_as_dataset* * _yt_array_hdf5(fh[field_type], field_name, data[field])* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/frontends/ytdata/utilities.py", line 208, in _yt_array_hdf5* * dataset = fh.create_dataset(str(field), data=data)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/h5py/_hl/group.py", line 111, in create_dataset* * self[name] = dset* * File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2846)* * File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2804)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/h5py/_hl/group.py", line 276, in __setitem__* * h5o.link(obj.id <http://obj.id>, self.id <http://self.id>, name, lcpl=lcpl, lapl=self._lapl)* * File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2846)* * File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2804)* * File "h5py/h5o.pyx", line 202, in h5py.h5o.link (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/h5o.c:3901)* *RuntimeError: Unable to create link (Name already exists)* A file G-0001_clump_0.h5 is created but when I try to load the data I get another error *----> 1 ds_clumps = yt.load('CLUMPS/G-0001_clump_0.h5')* *~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(*args, **kwargs)* * 96 return output_type_registry[n](fn)* * 97 mylog.error("Couldn't figure out output type for %s", args[0])* *---> 98 raise YTOutputNotIdentified(args, kwargs)* * 99 * * 100 mylog.error("Multiple output type candidates for %s:", args[0])* *YTOutputNotIdentified: Supplied ('CLUMPS/G-0001_clump_0.h5',) {}, but could not load!* Cheers! José Utreras
Hi Jose, This feels like a bug. Any chance you can make a runnable example that triggers this error? Please use one of the sample datasets at yt-project.org/data or if that’s not possible one of your own datasets, which you can share with us using the yt curldrop (see docs.hub.yt). Once we have a way to reproduce the error, please go ahead and file an issue about this on yt’s github so we don’t lose track. Nathan On Fri, Sep 22, 2017 at 8:32 AM José Mauricio Utreras <jutreras@ug.uchile.cl> wrote:
Hello yt users,
I have tried to save a clump dataset but I'm getting the following error:
*Code:* *...*
*find_clumps(master_clump, cmin, cmax, step)*
*fn=master_clump.save_as_dataset(fields=["cell_mass", "total","x","y","z","velocity_x","velocity_y","velocity_z"])* *print(fn)*
*...*
*Error*
*yt : [INFO ] 2017-09-22 10:34:12,164 Saving field data to yt dataset: G-0001_clump_0.h5.* *Traceback (most recent call last):* * File "Save_Clumps.py", line 43, in <module>* * master_clump.save_as_dataset(fields=["cell_mass", "total","x","y","z","velocity_x","velocity_y","velocity_z"])* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/analysis_modules/level_sets/clump_handling.py", line 365, in save_as_dataset* * extra_attrs=extra_attrs)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/frontends/ytdata/utilities.py", line 149, in save_as_dataset* * _yt_array_hdf5(fh[field_type], field_name, data[field])* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/frontends/ytdata/utilities.py", line 208, in _yt_array_hdf5* * dataset = fh.create_dataset(str(field), data=data)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/h5py/_hl/group.py", line 111, in create_dataset* * self[name] = dset* * File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2846)* * File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2804)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/h5py/_hl/group.py", line 276, in __setitem__* * h5o.link(obj.id <http://obj.id>, self.id <http://self.id>, name, lcpl=lcpl, lapl=self._lapl)* * File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2846)* * File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2804)* * File "h5py/h5o.pyx", line 202, in h5py.h5o.link (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/h5o.c:3901)* *RuntimeError: Unable to create link (Name already exists)*
A file G-0001_clump_0.h5 is created but when I try to load the data I get another error
*----> 1 ds_clumps = yt.load('CLUMPS/G-0001_clump_0.h5')*
*~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(*args, **kwargs)* * 96 return output_type_registry[n](fn)* * 97 mylog.error("Couldn't figure out output type for %s", args[0])* *---> 98 raise YTOutputNotIdentified(args, kwargs)* * 99 * * 100 mylog.error("Multiple output type candidates for %s:", args[0])*
*YTOutputNotIdentified: Supplied ('CLUMPS/G-0001_clump_0.h5',) {}, but could not load!*
Cheers!
José Utreras _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Jose, If I missed an update to this, please disregard. In any case, I am pretty sure this is happening because the "x", "y", and "z" fields get written automatically and so when you specify them, it is trying to write them twice. This is definitely a bug and should be easily fixed, but in the mean time you should be able to get around this by removing those fields from your field list. Britton On Fri, Sep 22, 2017 at 10:18 AM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hi Jose,
This feels like a bug.
Any chance you can make a runnable example that triggers this error? Please use one of the sample datasets at yt-project.org/data or if that’s not possible one of your own datasets, which you can share with us using the yt curldrop (see docs.hub.yt).
Once we have a way to reproduce the error, please go ahead and file an issue about this on yt’s github so we don’t lose track.
Nathan
On Fri, Sep 22, 2017 at 8:32 AM José Mauricio Utreras < jutreras@ug.uchile.cl> wrote:
Hello yt users,
I have tried to save a clump dataset but I'm getting the following error:
*Code:* *...*
*find_clumps(master_clump, cmin, cmax, step)*
*fn=master_clump.save_as_dataset(fields=["cell_mass", "total","x","y","z","velocity_x","velocity_y","velocity_z"])* *print(fn)*
*...*
*Error*
*yt : [INFO ] 2017-09-22 10:34:12,164 Saving field data to yt dataset: G-0001_clump_0.h5.* *Traceback (most recent call last):* * File "Save_Clumps.py", line 43, in <module>* * master_clump.save_as_dataset(fields=["cell_mass", "total","x","y","z","velocity_x","velocity_y","velocity_z"])* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/analysis_modules/level_sets/clump_handling.py", line 365, in save_as_dataset* * extra_attrs=extra_attrs)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/frontends/ytdata/utilities.py", line 149, in save_as_dataset* * _yt_array_hdf5(fh[field_type], field_name, data[field])* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/frontends/ytdata/utilities.py", line 208, in _yt_array_hdf5* * dataset = fh.create_dataset(str(field), data=data)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/h5py/_hl/group.py", line 111, in create_dataset* * self[name] = dset* * File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2846)* * File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2804)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/h5py/_hl/group.py", line 276, in __setitem__* * h5o.link(obj.id <http://obj.id>, self.id <http://self.id>, name, lcpl=lcpl, lapl=self._lapl)* * File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2846)* * File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2804)* * File "h5py/h5o.pyx", line 202, in h5py.h5o.link (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/h5o.c:3901)* *RuntimeError: Unable to create link (Name already exists)*
A file G-0001_clump_0.h5 is created but when I try to load the data I get another error
*----> 1 ds_clumps = yt.load('CLUMPS/G-0001_clump_0.h5')*
*~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(*args, **kwargs)* * 96 return output_type_registry[n](fn)* * 97 mylog.error("Couldn't figure out output type for %s", args[0])* *---> 98 raise YTOutputNotIdentified(args, kwargs)* * 99 * * 100 mylog.error("Multiple output type candidates for %s:", args[0])*
*YTOutputNotIdentified: Supplied ('CLUMPS/G-0001_clump_0.h5',) {}, but could not load!*
Cheers!
José Utreras _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Britton, Jose created an issue and I made a pull request to fix this: https://github.com/yt-project/yt/pull/1567 -Nathan On Wed, Sep 27, 2017 at 11:36 AM, Britton Smith <brittonsmith@gmail.com> wrote:
Hi Jose,
If I missed an update to this, please disregard. In any case, I am pretty sure this is happening because the "x", "y", and "z" fields get written automatically and so when you specify them, it is trying to write them twice. This is definitely a bug and should be easily fixed, but in the mean time you should be able to get around this by removing those fields from your field list.
Britton
On Fri, Sep 22, 2017 at 10:18 AM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
Hi Jose,
This feels like a bug.
Any chance you can make a runnable example that triggers this error? Please use one of the sample datasets at yt-project.org/data or if that’s not possible one of your own datasets, which you can share with us using the yt curldrop (see docs.hub.yt).
Once we have a way to reproduce the error, please go ahead and file an issue about this on yt’s github so we don’t lose track.
Nathan
On Fri, Sep 22, 2017 at 8:32 AM José Mauricio Utreras < jutreras@ug.uchile.cl> wrote:
Hello yt users,
I have tried to save a clump dataset but I'm getting the following error:
*Code:* *...*
*find_clumps(master_clump, cmin, cmax, step)*
*fn=master_clump.save_as_dataset(fields=["cell_mass", "total","x","y","z","velocity_x","velocity_y","velocity_z"])* *print(fn)*
*...*
*Error*
*yt : [INFO ] 2017-09-22 10:34:12,164 Saving field data to yt dataset: G-0001_clump_0.h5.* *Traceback (most recent call last):* * File "Save_Clumps.py", line 43, in <module>* * master_clump.save_as_dataset(fields=["cell_mass", "total","x","y","z","velocity_x","velocity_y","velocity_z"])* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/analysis_modules/level_sets/clump_handling.py", line 365, in save_as_dataset* * extra_attrs=extra_attrs)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/frontends/ytdata/utilities.py", line 149, in save_as_dataset* * _yt_array_hdf5(fh[field_type], field_name, data[field])* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/yt/frontends/ytdata/utilities.py", line 208, in _yt_array_hdf5* * dataset = fh.create_dataset(str(field), data=data)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/h5py/_hl/group.py", line 111, in create_dataset* * self[name] = dset* * File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2846)* * File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2804)* * File "/home/jutreras/miniconda3/lib/python3.6/site-packages/h5py/_hl/group.py", line 276, in __setitem__* * h5o.link(obj.id <http://obj.id>, self.id <http://self.id>, name, lcpl=lcpl, lapl=self._lapl)* * File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2846)* * File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/_objects.c:2804)* * File "h5py/h5o.pyx", line 202, in h5py.h5o.link (/home/ilan/minonda/conda-bld/h5py_1496889914775/work/h5py/h5o.c:3901)* *RuntimeError: Unable to create link (Name already exists)*
A file G-0001_clump_0.h5 is created but when I try to load the data I get another error
*----> 1 ds_clumps = yt.load('CLUMPS/G-0001_clump_0.h5')*
*~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(*args, **kwargs)* * 96 return output_type_registry[n](fn)* * 97 mylog.error("Couldn't figure out output type for %s", args[0])* *---> 98 raise YTOutputNotIdentified(args, kwargs)* * 99 * * 100 mylog.error("Multiple output type candidates for %s:", args[0])*
*YTOutputNotIdentified: Supplied ('CLUMPS/G-0001_clump_0.h5',) {}, but could not load!*
Cheers!
José Utreras _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Britton Smith
-
José Mauricio Utreras
-
Nathan Goldbaum