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

Fix Annotations time formats #13109

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Merge branch 'main' into fix_annotations_orig_time

7cceed6
Select commit
Loading
Failed to load commit list.
Open

Fix Annotations time formats #13109

Merge branch 'main' into fix_annotations_orig_time
7cceed6
Select commit
Loading
Failed to load commit list.
Azure Pipelines / mne-tools.mne-python failed Feb 10, 2025 in 1h 13m 33s

Build #20250210.25 had test failures

Details

Tests

  • Failed: 2 (0.02%)
  • Passed: 9,779 (98.26%)
  • Other: 171 (1.72%)
  • Total: 9,952
Code coverage

  • 33122 of 120162 line covered (27.56%)

Annotations

Check failure on line 5060 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / mne-tools.mne-python

Build log #L5060

Cmd.exe exited with code '1'.

Check failure on line 24 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / mne-tools.mne-python

Build log #L24

There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab.

Check failure on line 24 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / mne-tools.mne-python

Build log #L24

There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab.

Check failure on line 5064 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / mne-tools.mne-python

Build log #L5064

Cmd.exe exited with code '1'.

Check failure on line 1 in test_to_data_frame_time_format[datetime]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / mne-tools.mne-python

test_to_data_frame_time_format[datetime]

TypeError: Cannot use .astype to convert from timezone-aware dtype to timezone-naive dtype. Use obj.tz_localize(None) or obj.tz_convert('UTC').tz_localize(None) instead.
Raw output
mne\io\fiff\tests\test_raw_fiff.py:1596: in test_to_data_frame_time_format
    df = raw.to_data_frame(time_format=time_format)
<decorator-gen-360>:12: in to_data_frame
    ???
mne\io\base.py:2470: in to_data_frame
    times = _convert_times(
mne\utils\dataframe.py:49: in _convert_times
    times = (to_timedelta(times + first_time, unit="s") + meas_date).astype(
C:\hostedtoolcache\windows\Python\3.12.8\x64\Lib\site-packages\pandas\core\indexes\base.py:1148: in astype
    new_values = values.astype(dtype, copy=copy)
C:\hostedtoolcache\windows\Python\3.12.8\x64\Lib\site-packages\pandas\core\arrays\datetimes.py:743: in astype
    raise TypeError(
E   TypeError: Cannot use .astype to convert from timezone-aware dtype to timezone-naive dtype. Use obj.tz_localize(None) or obj.tz_convert('UTC').tz_localize(None) instead.

Check failure on line 1 in test_to_data_frame_time_format[datetime]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / mne-tools.mne-python

test_to_data_frame_time_format[datetime]

TypeError: Cannot use .astype to convert from timezone-aware dtype to timezone-naive dtype. Use obj.tz_localize(None) or obj.tz_convert('UTC').tz_localize(None) instead.
Raw output
mne\io\fiff\tests\test_raw_fiff.py:1596: in test_to_data_frame_time_format
    df = raw.to_data_frame(time_format=time_format)
<decorator-gen-360>:12: in to_data_frame
    ???
mne\io\base.py:2470: in to_data_frame
    times = _convert_times(
mne\utils\dataframe.py:49: in _convert_times
    times = (to_timedelta(times + first_time, unit="s") + meas_date).astype(
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\pandas\core\indexes\base.py:1087: in astype
    new_values = values.astype(dtype, copy=copy)
C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\pandas\core\arrays\datetimes.py:720: in astype
    raise TypeError(
E   TypeError: Cannot use .astype to convert from timezone-aware dtype to timezone-naive dtype. Use obj.tz_localize(None) or obj.tz_convert('UTC').tz_localize(None) instead.