jtjones1001 / nvmetools

Basic tools for working with NVMe SSD on Windows or Linux
MIT License
13 stars 2 forks source link

readnvme - list index out of range - if MDTS is Unrestricted [Windows] #4

Open kiloforce opened 6 months ago

kiloforce commented 6 months ago
C:\> readnvme -n 2

 Epic! NVMe Tools, version 0.8.0, www.nvmetools.com, Copyright (C) 2023 Joe Jones
         ------------------------------------------------------------------------------------------
          NVME DRIVE 2  (\\.\PHYSICALDRIVE2)
         ------------------------------------------------------------------------------------------
...
...
 ------------------------------------------------------------------------------------------
  FATAL ERROR : 50
 ------------------------------------------------------------------------------------------
 Unknown error.  Send developer details below and debug.log

Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\nvmetools\console\readnvme.py", line 201, in read_nvme
    info.show()
  File "C:\Python312\Lib\site-packages\nvmetools\support\info.py", line 657, in show
    self._show()
  File "C:\Python312\Lib\site-packages\nvmetools\support\info.py", line 441, in _show
    self.features()
  File "C:\Python312\Lib\site-packages\nvmetools\support\info.py", line 479, in features
    self._as_pwr2("Maximum Data Transfer Size (MDTS)"),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\nvmetools\support\info.py", line 406, in _as_pwr2
    return self.parameters[name].split("=")[1].strip(")")
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
C:\> readnvme -n 2 -a | find "MDTS"
          Maximum Data Transfer Size (MDTS)                  Unrestricted

Tested with same result on both Windows 10 and Windows 11.