equinor / webviz-ert

ERT webviz plugins
GNU General Public License v3.0
12 stars 23 forks source link

Incompatible with Pandas==2.0.1 #432

Closed berland closed 7 months ago

berland commented 1 year ago

Describe the bug Crash from test suite:

  File "/home/runner/work/webviz-ert/webviz-ert/webviz_ert/models/response.py", line 37, in axis
    return self.data.index
  File "/home/runner/work/webviz-ert/webviz-ert/webviz_ert/models/response.py", line 50, in data
    self._data = self._data_loader.get_ensemble_record_data(
  File "/home/runner/work/webviz-ert/webviz-ert/webviz_ert/data_loader/__init__.py", line 199, in get_ensemble_record_data
    df.index = df.index.astype(int)
  File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 1027, in astype
    new_values = astype_array(values, dtype=dtype, copy=copy)
  File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/pandas/core/dtypes/astype.py", line 187, in astype_array
    values = _astype_nansafe(values, dtype, copy=copy)
  File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/pandas/core/dtypes/astype.py", line 138, in _astype_nansafe
    return arr.astype(dtype, copy=True)
ValueError: invalid literal for int() with base 10: '2010-01-10 00:00:00'

To Reproduce Steps to reproduce the behavior:

  1. pip install pandas==2.0.1
  2. Run test suite

Expected behavior Compatible.

Desktop (please complete the following information):