test_serialize_hdf5_masked failed for 3.1rc1
See original GitHub issueI just tested astropy 3.1rc1 into a python 3.7.1 environment with numpy=1.15.4 and h5py=2.8.0.
1 failed, 11370 passed, 264 skipped, 67 xfailed, 3106 warnings, 2 error in 245.20 seconds
I show the output from the one failure below, but I posted the full testing log at this gist.
========================================================== FAILURES ==========================================================
_________________________________________________ test_serialize_hdf5_masked _________________________________________________
tbl = <Table length=3>
col0
object
------------------
0.9999999999969589
--
3.000000000000469
def _encode_mixins(tbl):
"""Encode a Table ``tbl`` that may have mixin columns to a Table with only
astropy Columns + appropriate meta-data to allow subsequent decoding.
"""
from ...table import serialize
from ...table.table import has_info_class
from ... import units as u
from ...utils.data_info import MixinInfo, serialize_context_as
# If PyYAML is not available then check to see if there are any mixin cols
# that *require* YAML serialization. HDF5 already has support for
# Quantity, so if those are the only mixins the proceed without doing the
# YAML bit, for backward compatibility (i.e. not requiring YAML to write
# Quantity).
try:
> import yaml
E ModuleNotFoundError: No module named 'yaml'
/anaconda3/envs/astropy_testing/lib/python3.7/site-packages/astropy/io/misc/hdf5.py:206: ModuleNotFoundError
During handling of the above exception, another exception occurred:
tmpdir = local('/private/var/folders/xj/6rkkv6w11vxg2ryy8whq850c0000gn/T/pytest-of-aphearin/pytest-0/test_serialize_hdf5_masked0')
@pytest.mark.skipif('not HAS_H5PY')
def test_serialize_hdf5_masked(tmpdir):
tm = Time([1, 2, 3], format='cxcsec')
tm[1] = np.ma.masked
fn = str(tmpdir.join('tempfile.hdf5'))
t = Table([tm])
> t.write(fn, path='root', serialize_meta=True)
/anaconda3/envs/astropy_testing/lib/python3.7/site-packages/astropy/time/tests/test_mask.py:178:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/anaconda3/envs/astropy_testing/lib/python3.7/site-packages/astropy/table/table.py:2592: in write
io_registry.write(self, *args, **kwargs)
/anaconda3/envs/astropy_testing/lib/python3.7/site-packages/astropy/io/registry.py:560: in write
writer(data, *args, **kwargs)
/anaconda3/envs/astropy_testing/lib/python3.7/site-packages/astropy/io/misc/hdf5.py:298: in write_table_hdf5
compatibility_mode=compatibility_mode)
/anaconda3/envs/astropy_testing/lib/python3.7/site-packages/astropy/io/misc/hdf5.py:316: in write_table_hdf5
table = _encode_mixins(table)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tbl = <Table length=3>
col0
object
------------------
0.9999999999969589
--
3.000000000000469
def _encode_mixins(tbl):
"""Encode a Table ``tbl`` that may have mixin columns to a Table with only
astropy Columns + appropriate meta-data to allow subsequent decoding.
"""
from ...table import serialize
from ...table.table import has_info_class
from ... import units as u
from ...utils.data_info import MixinInfo, serialize_context_as
# If PyYAML is not available then check to see if there are any mixin cols
# that *require* YAML serialization. HDF5 already has support for
# Quantity, so if those are the only mixins the proceed without doing the
# YAML bit, for backward compatibility (i.e. not requiring YAML to write
# Quantity).
try:
import yaml
except ImportError:
for col in tbl.itercols():
if (has_info_class(col, MixinInfo) and
col.__class__ is not u.Quantity):
raise TypeError("cannot write type {} column '{}' "
"to HDF5 without PyYAML installed."
> .format(col.__class__.__name__, col.info.name))
E TypeError: cannot write type Time column 'col0' to HDF5 without PyYAML installed.
/anaconda3/envs/astropy_testing/lib/python3.7/site-packages/astropy/io/misc/hdf5.py:213: TypeError
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
a691ad9fa78a3fb57790224be84... - Index of /pub - Fedora
... 0023-oops-post-create-do-not-fail-the-event-if-check-oops.patch ... aria2.spec mask-headers-37368130ca7.patch arj-3.10.22-64_bit_clean.patch ...
Read more >Untitled
... atune-bugfix-atune-adm-check-error-before-atune-adm-profile.patch ... jdiff-pom-template.xml jdiff-script jdiff.spec jdo-3.1-rc1-src.tar.gz jdo-api.spec ...
Read more >Untitled
GA-dist.tar.gz apiviz.spec apmd-3.2-build.patch apmd-3.2-error.patch ... rapidjson-d87b698.tar.gz serialize-130ffc3.tar.gz settings-a504046.tar.gz ...
Read more >3954c74e54719c6ab73b..
... In-tests-show-the-exception-on-failure.patch apache-mod_auth_gssapi.spec ... gcc32-mklibgcc-serialize-crtfiles.patch gcc32-pr7434-testcase.patch ...
Read more >Untitled
GA-dist.tar.gz apiviz.spec apmd-3.2-build.patch apmd-3.2-error.patch apmd-3.2-umask.patch ... boost-1.64.0-serialization-make_array.patch boost.spec ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pllim -
docs/install.rst
, just extend the scope, that pyyaml is also needed toserialize mixins for various formats
?But does this mean the test should be skipped if PyYAML is not installed?