chadmiller/zpool-iostat-viz

Crash w/ Python 3.6.9,

Closed this issue · 6 comments

user@myhost:~# python3 --version
Python 3.6.9
user@myhost:~# python3 bin/zpool-iostat-viz
CRASH! Sorry!
Please report this error at 
https://github.com/chadmiller/zpool-iostat-viz/issues/new

Paste the following:
Traceback (most recent call last):
  File "bin/zpool-iostat-viz", line 303, in <module>
    raise exc
  File "bin/zpool-iostat-viz", line 292, in <module>
    curses.wrapper(lambda window: main(window, parsed_args.pools, parsed_args.file))
  File "/usr/lib/python3.6/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "bin/zpool-iostat-viz", line 292, in <lambda>
    curses.wrapper(lambda window: main(window, parsed_args.pools, parsed_args.file))
  File "bin/zpool-iostat-viz", line 280, in main
    display_measurements_for_device(pool, filename, window)
  File "bin/zpool-iostat-viz", line 152, in display_measurements_for_device
    stats = get_stats(pool, filename)
  File "bin/zpool-iostat-viz", line 63, in get_stats
    zpool_cmd = subprocess.run(["zpool", "iostat", "-wvHp"] + (pool_names if pool_names else []), check=True, capture_output=True, encoding="UTF-8")
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

Thank you! Fixed.

Hi @chadmiller thanks for the quick response! Unfortunately that didn't quite close the loop, please see below...

user@host:~# zpool-iostat-viz tank
CRASH! Sorry!
Please report this error at 
https://github.com/chadmiller/zpool-iostat-viz/issues/new

   REDACTED
and also include Traceback (most recent call last):
  File "/root/bin/zpool-iostat-viz", line 302, in <module>
    raise exc
  File "/root/bin/zpool-iostat-viz", line 291, in <module>
    curses.wrapper(lambda window: main(window, parsed_args.pools, parsed_args.file))
  File "/usr/lib/python3.6/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/root/bin/zpool-iostat-viz", line 291, in <lambda>
    curses.wrapper(lambda window: main(window, parsed_args.pools, parsed_args.file))
  File "/root/bin/zpool-iostat-viz", line 279, in main
    display_measurements_for_device(pool, filename, window)
  File "/root/bin/zpool-iostat-viz", line 151, in display_measurements_for_device
    stats = get_stats(pool, filename)
  File "/root/bin/zpool-iostat-viz", line 71, in get_stats
    stats[-1][1].append(ColsIoStat(*tuple(int(s) for s in line.split("\t"))))
TypeError: __new__() missing 1 required positional argument: 'trim'

Should I have mentioned this is ZFS on Linux? Maybe you're only supporting Solaris?

user@host:~# cat /sys/module/zfs/version 
0.7.5-1ubuntu16.11
user@host:~# uname -a
Linux host 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 06:54:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Python3.7 is a few years old. You should try it. :)

I added a tool to use Docker to reach back into the mists of time to run this tool with ancient, eldritch tomes, yea! verily, even as far back as python3.4. O! Pity those poor souls! At least we can say they are not the Cursèd ones, in the realm beyond, in the Py Twos. spits