Skip to content

TypeError: unsupported format string passed to NoneType.__format__ / statx #2

@yarox24

Description

@yarox24

btime = "{:17.6f}".format(statx.statx(fname).btime)

Traceback:

(... more data ...)
0|/etc/ld.so.conf|786616|-rw-rw-r--|0|0|34|1734440793.017330|1608116695.000000|1697471167.713379|1697471167.713379
0|/etc/rsyslog.conf|786654|-rw-rw-r--|0|0|1382|1734436377.488000|1640302499.000000|1697471167.721380|1697471167.721380
0|/etc/inputrc|786609|-rw-rw-r--|0|0|1748|1734679563.963715|1641486414.000000|1697471167.709378|1697471167.709378
0|/etc/magic.mime|786629|-rw-rw-r--|0|0|111|1697522640.364750|1648141629.000000|1697471167.713379|1697471167.713379
0|/etc/ethertypes|786596|-rw-rw-r--|0|0|1816|1577407331.000000|1577407331.000000|1697471167.705378|1697471167.705378
Traceback (most recent call last):
  File "/root/docker/mac-robber/orig/mac-robber.py", line 221, in <module>
    outstr = process_item(dirpath, filename)
  File "/root/docker/mac-robber/orig/mac-robber.py", line 131, in process_item
    btime = "{:17.6f}".format(statx.statx(fname).btime)
TypeError: unsupported format string passed to NoneType.__format__

I installed library: https://pypi.org/project/pystatx/ (Version: 0.1)

and there is following error in this underlying library:

image

Problem seems to be related with links:
image

But stat is working on this link:
image

I'm writing here as there is only single version of this library, which may be no longer maintained.

My dirty solution:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions