Skip to content

BUG: np.memmap broken on Windows (maybe) #25665

@larsoner

Description

@larsoner

Sometime in the last week our Windows pip-pre job in MNE-Python started failing with:

mne\io\base.py:2376: in _allocate_data
    data = np.memmap(str(preload), mode="w+", dtype=dtype, shape=shape)
C:\hostedtoolcache\windows\Python\3.11.7\x64\Lib\site-packages\numpy\_core\memmap.py:233: in __new__
    f_ctx = open(
E   OSError: [Errno 22] Invalid argument: 'memmap.dat'

I restarted the job and got the same error. I find this a bit baffling and am not 100% sure this is a NumPy issue. I see #25409 touched memmap.py in the right time frame but I am not sure how __array_wrap__ could be a culprit here. Notably there is no failure on Linux pip-pre so somehow this is Windows-specific. EDIT: Also no failure on other Windows jobs so it seems likely to be NumPy 2.0.0.dev0-specific, too.

I will try to replicate locally on my Windows boot tomorrow but wanted to throw this out there in case anyone had ideas for immediate culprits. I thought maybe pytest could be an issue but their last stable 7.4.4 came out weeks ago and we've had green builds since then.

Metadata

Metadata

Assignees

No one assigned

    Labels

    57 - Close?Issues which may be closable unless discussion continued

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions