Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit error #27

Open
abkfenris opened this issue May 14, 2019 · 1 comment
Open

Unit error #27

abkfenris opened this issue May 14, 2019 · 1 comment
Assignees

Comments

@abkfenris
Copy link
Member

[2019-05-14 14:41:52,557: ERROR/ForkPoolWorker-3] Task deployments.tasks.refresh_server[98281347-756f-40f4-9cf6-8c0d9af5eb63] raised unexpected: ValueError("unable to decode time units 'seconds since 1970-01-01T00:00:00Z' with calendar 'gregorian'. Try opening your dataset with decode_times=False.")
celery-worker_1 | Traceback (most recent call last):
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/coding/times.py", line 176, in decode_cf_datetime
celery-worker_1 |     calendar)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/coding/times.py", line 141, in _decode_datetime_with_pandas
celery-worker_1 |     pd.to_timedelta(flat_num_dates.min(), delta) + ref_date
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/pandas/core/tools/timedeltas.py", line 114, in to_timedelta
celery-worker_1 |     box=box, errors=errors)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/pandas/core/tools/timedeltas.py", line 121, in _coerce_scalar_to_timedelta_type
celery-worker_1 |     result = Timedelta(r, unit)
celery-worker_1 |   File "pandas/_libs/tslibs/timedeltas.pyx", line 1193, in pandas._libs.tslibs.timedeltas.Timedelta.__new__
celery-worker_1 |   File "pandas/_libs/tslibs/timedeltas.pyx", line 190, in pandas._libs.tslibs.timedeltas.convert_to_timedelta64
celery-worker_1 |   File "pandas/_libs/tslibs/timedeltas.pyx", line 308, in pandas._libs.tslibs.timedeltas.cast_from_unit
celery-worker_1 | OverflowError: Python int too large to convert to C long
celery-worker_1 |
celery-worker_1 | During handling of the above exception, another exception occurred:
celery-worker_1 |
celery-worker_1 | Traceback (most recent call last):
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/coding/times.py", line 94, in _decode_cf_datetime_dtype
celery-worker_1 |     use_cftime)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/coding/times.py", line 179, in decode_cf_datetime
celery-worker_1 |     flat_num_dates.astype(np.float), units, calendar)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/coding/times.py", line 113, in _decode_datetime_with_cftime
celery-worker_1 |     only_use_cftime_datetimes=True))
celery-worker_1 |   File "cftime/_cftime.pyx", line 267, in cftime._cftime.num2date
celery-worker_1 |   File "cftime/_cftime.pyx", line 869, in cftime._cftime.utime.num2date
celery-worker_1 |   File "cftime/_cftime.pyx", line 493, in cftime._cftime.DateFromJulianDay
celery-worker_1 |   File "cftime/_cftime.pyx", line 472, in cftime._cftime.DateFromJulianDay.getdateinfo
celery-worker_1 |   File "cftime/_cftime.pyx", line 1935, in cftime._cftime._IntJulianDayToDate
celery-worker_1 | ValueError: julian day must be a positive integer
celery-worker_1 |
celery-worker_1 | During handling of the above exception, another exception occurred:
celery-worker_1 |
celery-worker_1 | Traceback (most recent call last):
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
celery-worker_1 |     R = retval = fun(*args, **kwargs)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
celery-worker_1 |     return self.run(*args, **kwargs)
celery-worker_1 |   File "/app/deployments/tasks.py", line 81, in refresh_server
celery-worker_1 |     refresh_dataset(ds.id)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/celery/local.py", line 191, in __call__
celery-worker_1 |     return self._get_current_object()(*a, **kw)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/celery/app/trace.py", line 649, in __protected_call__
celery-worker_1 |     return orig(self, *args, **kwargs)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/celery/app/task.py", line 394, in __call__
celery-worker_1 |     return self.run(*args, **kwargs)
celery-worker_1 |   File "/app/deployments/tasks.py", line 64, in refresh_dataset
celery-worker_1 |     update_values_for_timeseries(timeseries)
celery-worker_1 |   File "/app/deployments/tasks.py", line 22, in update_values_for_timeseries
celery-worker_1 |     timeseries,
celery-worker_1 |   File "/app/deployments/utils/erddap_datasets.py", line 43, in retrieve_dataframe
celery-worker_1 |     ds = e.to_xarray()
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/erddapy/erddapy.py", line 339, in to_xarray
celery-worker_1 |     return xr.open_dataset(tmp.name, **kw)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/backends/api.py", line 394, in open_dataset
celery-worker_1 |     ds = maybe_decode_store(store)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/backends/api.py", line 324, in maybe_decode_store
celery-worker_1 |     drop_variables=drop_variables, use_cftime=use_cftime)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/conventions.py", line 479, in decode_cf
celery-worker_1 |     decode_coords, drop_variables=drop_variables, use_cftime=use_cftime)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/conventions.py", line 401, in decode_cf_variables
celery-worker_1 |     stack_char_dim=stack_char_dim, use_cftime=use_cftime)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/conventions.py", line 306, in decode_cf_variable
celery-worker_1 |     var = coder.decode(var, name=name)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/coding/times.py", line 419, in decode
celery-worker_1 |     self.use_cftime)
celery-worker_1 |   File "/usr/local/lib/python3.7/site-packages/xarray/coding/times.py", line 101, in _decode_cf_datetime_dtype
celery-worker_1 |     raise ValueError(msg)
celery-worker_1 | ValueError: unable to decode time units 'seconds since 1970-01-01T00:00:00Z' with calendar 'gregorian'. Try opening your dataset with decode_times=False.
@abkfenris
Copy link
Member Author

@abkfenris abkfenris self-assigned this Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant