Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

os.fstat() fails on FAT32 file system on Windows #111856

Closed
Labels
OS-windowstype-bugAn unexpected behavior, bug, or error
@adang1345

Description

@adang1345

Bug report

Bug description:

This is Python 3.12.0 x64 running on Windows 11. On a FAT32 drive, I have a filef.txt.

>>>importos>>>os.stat('f.txt')os.stat_result(st_mode=33206,st_ino=4194560,st_dev=1589430838,st_nlink=1,st_uid=0,st_gid=0,st_size=0,st_atime=1699419600,st_mtime=1699459266,st_ctime=1699459265)>>>f=open('f.txt','rb')>>>f.fileno()3>>>os.fstat(f.fileno())Traceback (mostrecentcalllast):File"<stdin>",line1,in<module>OSError: [WinError87]Theparameterisincorrect

This error does not occur with Python 3.11.6. I suspect that the issue was introduced with#102149.6031727 provided a fix foros.stat(), but it seems that an equivalent bug exists foros.fstat().

I believe the fix would involve changing the linehttps://github.com/python/cpython/blob/74b868f636a8af9e5540e3315de666500147d47a/Python/fileutils.c#L1275C48-L1275C48 to account for the possibility that the file system does not supportFileIdInfo.

CPython versions tested on:

3.12

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowstype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp