issues: 1552630830
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1552630830 | I_kwDOAMm_X85ci0Qu | 7467 | Many tests fail: AttributeError: 'cftime._cftime.DatetimeJulian' object has no attribute 'daysinmonth' | 271906 | closed | 0 | 6 | 2023-01-23T07:24:40Z | 2023-09-26T15:27:42Z | 2023-09-26T15:27:42Z | NONE | What happened?There are many failures due to missing 'daysinmonth' attribute: ``` _____________ test_infer_freq[360_day-3QS-DEC] ________________ freq = '3QS-DEC', calendar = '360_day'
/usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/tests/test_cftimeindex.py:1334: /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:98: in infer_freq return inferer.get_freq() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:133: in get_freq return self._infer_daily_rule() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:158: in _infer_daily_rule quartely_rule = self._get_quartely_rule() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:194: in _get_quartely_rule return {"cs": "QS", "ce": "Q"}.get(month_anchor_check(self.index)) dates = <[AttributeError("'cftime._cftime.Datetime360Day' object has no attribute 'daysinmonth'") raised in repr()] CFTimeIndex object at 0xc989846a0>
/usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:262: AttributeError ____________ test_infer_freq[365_day-A-DEC] _____________ freq = 'A-DEC', calendar = '365_day'
/usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/tests/test_cftimeindex.py:1334: /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:98: in infer_freq return inferer.get_freq() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:133: in get_freq return self._infer_daily_rule() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:151: in _infer_daily_rule annual_rule = self._get_annual_rule() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:185: in _get_annual_rule return {"cs": "AS", "ce": "A"}.get(month_anchor_check(self.index)) dates = <[AttributeError("'cftime._cftime.DatetimeNoLeap' object has no attribute 'daysinmonth'") raised in repr()] CFTimeIndex object at 0xc9b802040>
/usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:262: AttributeError ____________ test_infer_freq[julian-Q-NOV] ____________ freq = 'Q-NOV', calendar = 'julian'
/usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/tests/test_cftimeindex.py:1334: /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:98: in infer_freq return inferer.get_freq() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:133: in get_freq return self._infer_daily_rule() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:158: in _infer_daily_rule quartely_rule = self._get_quartely_rule() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:194: in _get_quartely_rule return {"cs": "QS", "ce": "Q"}.get(month_anchor_check(self.index)) dates = <[AttributeError("'cftime._cftime.DatetimeJulian' object has no attribute 'daysinmonth'") raised in repr()] CFTimeIndex object at 0xc9a4c14c0>
/usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:262: AttributeError _____________ test_infer_freq[all_leap-MS] ______________ freq = 'MS', calendar = 'all_leap'
/usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/tests/test_cftimeindex.py:1334: /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:98: in infer_freq return inferer.get_freq() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:133: in get_freq return self._infer_daily_rule() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:166: in _infer_daily_rule monthly_rule = self._get_monthly_rule() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:200: in _get_monthly_rule return {"cs": "MS", "ce": "M"}.get(month_anchor_check(self.index)) dates = <[AttributeError("'cftime._cftime.DatetimeAllLeap' object has no attribute 'daysinmonth'") raised in repr()] CFTimeIndex object at 0xc9b8022b0>
/usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:262: AttributeError ___________ test_cftimeindex_calendar_repr[julian-julian] ___________ calendar = 'julian', expected = 'julian'
/usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/tests/test_cftimeindex.py:1012: /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/cftimeindex.py:356: in repr attrs_str = format_attrs(self) /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/cftimeindex.py:276: in format_attrs "freq": f"'{index.freq}'" if len(index) >= 3 else None, /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/cftimeindex.py:708: in freq return infer_freq(self) /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:98: in infer_freq return inferer.get_freq() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:133: in get_freq return self._infer_daily_rule() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:151: in _infer_daily_rule annual_rule = self._get_annual_rule() /usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:185: in _get_annual_rule return {"cs": "AS", "ce": "A"}.get(month_anchor_check(self.index)) dates = <[AttributeError("'cftime._cftime.DatetimeJulian' object has no attribute 'daysinmonth'") raised in repr()] CFTimeIndex object at 0xc9a4d6e50>
/usr/ports/devel/py-xarray/work-py39/xarray-2023.1.0/xarray/coding/frequencies.py:262: AttributeError ``` Version: 2023.1.0 Python-3.9 FreeBSD 13.1 What did you expect to happen?No response Minimal Complete Verifiable ExampleNo response MVCE confirmation
Relevant log outputNo response Anything else we need to know?No response Environment |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/7467/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |