home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 1688779793 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 3

  • spencerkclark 1
  • Illviljan 1
  • welcome[bot] 1

author_association 2

  • MEMBER 2
  • NONE 1

issue 1

  • TypeError for time_bnds variable when calling Dataset.to_netcdf · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1528760172 https://github.com/pydata/xarray/issues/7794#issuecomment-1528760172 https://api.github.com/repos/pydata/xarray/issues/7794 IC_kwDOAMm_X85bHwds spencerkclark 6628425 2023-04-29T11:07:29Z 2023-04-29T11:11:45Z MEMBER

The cftime.Datetime360Day objects are still expected here. We have not switched over to the universal cftime.datetime class yet within xarray, though my sense is this would likely still be an issue regardless (the traceback indicates the error comes up in xarray's indexing logic). cftime.Datetime360Day instances are instances of cftime.datetime objects:

```

import cftime isinstance(cftime.Datetime360Day(2000, 1, 1), cftime.datetime) True ```

This is the full traceback for reference: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/spencer/software/xarray/xarray/core/dataset.py", line 1917, in to_netcdf return to_netcdf( # type: ignore # mypy cannot resolve the overloads:( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/software/xarray/xarray/backends/api.py", line 1216, in to_netcdf dump_to_store( File "/Users/spencer/software/xarray/xarray/backends/api.py", line 1263, in dump_to_store store.store(variables, attrs, check_encoding, writer, unlimited_dims=unlimited_dims) File "/Users/spencer/software/xarray/xarray/backends/common.py", line 269, in store variables, attributes = self.encode(variables, attributes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/software/xarray/xarray/backends/common.py", line 358, in encode variables, attributes = cf_encoder(variables, attributes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/software/xarray/xarray/conventions.py", line 773, in cf_encoder _update_bounds_encoding(variables) File "/Users/spencer/software/xarray/xarray/conventions.py", line 347, in _update_bounds_encoding ) or contains_cftime_datetimes(v) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/software/xarray/xarray/core/common.py", line 1818, in contains_cftime_datetimes return _contains_cftime_datetimes(var._data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/software/xarray/xarray/core/common.py", line 1811, in _contains_cftime_datetimes return isinstance(np.asarray(sample).item(), cftime.datetime) ^^^^^^^^^^^^^^^^^^ File "/Users/spencer/Software/miniconda3/envs/xarray-tests-py311/lib/python3.11/site-packages/dask/array/core.py", line 1700, in __array__ x = self.compute() ^^^^^^^^^^^^^^ File "/Users/spencer/Software/miniconda3/envs/xarray-tests-py311/lib/python3.11/site-packages/dask/base.py", line 314, in compute (result,) = compute(self, traverse=False, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/Software/miniconda3/envs/xarray-tests-py311/lib/python3.11/site-packages/dask/base.py", line 599, in compute results = schedule(dsk, keys, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/Software/miniconda3/envs/xarray-tests-py311/lib/python3.11/site-packages/dask/threaded.py", line 89, in get results = get_async( ^^^^^^^^^^ File "/Users/spencer/Software/miniconda3/envs/xarray-tests-py311/lib/python3.11/site-packages/dask/local.py", line 511, in get_async raise_exception(exc, tb) File "/Users/spencer/Software/miniconda3/envs/xarray-tests-py311/lib/python3.11/site-packages/dask/local.py", line 319, in reraise raise exc File "/Users/spencer/Software/miniconda3/envs/xarray-tests-py311/lib/python3.11/site-packages/dask/local.py", line 224, in execute_task result = _execute_task(task, data) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/Software/miniconda3/envs/xarray-tests-py311/lib/python3.11/site-packages/dask/core.py", line 119, in _execute_task return func(*(_execute_task(a, cache) for a in args)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/Software/miniconda3/envs/xarray-tests-py311/lib/python3.11/site-packages/dask/array/core.py", line 120, in getter c = a[b] ~^^^ File "/Users/spencer/software/xarray/xarray/core/indexing.py", line 490, in __getitem__ result = self.array[self.indexer_cls(key)] ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/software/xarray/xarray/core/indexing.py", line 699, in __getitem__ return type(self)(_wrap_numpy_scalars(self.array[key])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/software/xarray/xarray/core/indexing.py", line 686, in __init__ self.array = _wrap_numpy_scalars(as_indexable(array)) ^^^^^^^^^^^^^^^^^^^ File "/Users/spencer/software/xarray/xarray/core/indexing.py", line 727, in as_indexable raise TypeError(f"Invalid array type: {type(array)}") TypeError: Invalid array type: <class 'cftime._cftime.Datetime360Day'>

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  TypeError for time_bnds variable when calling Dataset.to_netcdf 1688779793
1528527292 https://github.com/pydata/xarray/issues/7794#issuecomment-1528527292 https://api.github.com/repos/pydata/xarray/issues/7794 IC_kwDOAMm_X85bG3m8 Illviljan 14371165 2023-04-29T02:39:19Z 2023-04-29T02:39:19Z MEMBER

Why/where do you get a cftime._cftime.Datetime360Day ? It is deprecated according to cftime.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  TypeError for time_bnds variable when calling Dataset.to_netcdf 1688779793
1527759092 https://github.com/pydata/xarray/issues/7794#issuecomment-1527759092 https://api.github.com/repos/pydata/xarray/issues/7794 IC_kwDOAMm_X85bD8D0 welcome[bot] 30606887 2023-04-28T15:48:28Z 2023-04-28T15:48:28Z NONE

Thanks for opening your first issue here at xarray! Be sure to follow the issue template! If you have an idea for a solution, we would really welcome a Pull Request with proposed changes. See the Contributing Guide for more. It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better. Thank you!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  TypeError for time_bnds variable when calling Dataset.to_netcdf 1688779793

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 16.351ms · About: xarray-datasette