FAILED tests/test_vlen_str.py::test_pathological_strings - AttributeError: 'numpy.bytes_' object has no attribute 'encode'. Did you mean: 'decode'?
(work26) bnl28@atmbnl pyfive % pytest tests/test_vlen_str.py
platform darwin -- Python 3.12.13, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/bnl28/Repositories/pyfive
configfile: pyproject.toml
plugins: cov-7.1.0, metadata-3.1.1, html-4.2.0, zarr-3.1.5
collected 4 items
tmp_path = PosixPath('/private/var/folders/9w/f_svt4hn1t713pvb1q2jhdr00000gn/T/pytest-of-bnl28/pytest-371/test_pathological_strings0')
def test_pathological_strings(tmp_path):
tfile = tmp_path / "test_strings.nc"
> validation = make_pathological_nc(tfile)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_vlen_str.py:220:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_vlen_str.py:126: in make_pathological_nc
c_months4[:, :] = nc.stringtochar(months)
^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E AttributeError: 'numpy.bytes_' object has no attribute 'encode'. Did you mean: 'decode'?
src/netCDF4/_netCDF4.pyx:6824: AttributeError