Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rx-buffers-increase error with python 3.9 (debian 11 beta) #223

Open
alekskomp opened this issue Aug 2, 2021 · 2 comments
Open

rx-buffers-increase error with python 3.9 (debian 11 beta) #223

alekskomp opened this issue Aug 2, 2021 · 2 comments

Comments

@alekskomp
Copy link

Hello. Got this error:

# rx-buffers-increase enp1s0f0
Traceback (most recent call last):
  File "/usr/local/bin/rx-buffers-increase", line 12, in <module>
    RxBuffersTune()
  File "/usr/local/lib/python3.9/dist-packages/netutils_linux_tuning/rx_buffers.py", line 30, in __init__
    self.parse()
  File "/usr/local/lib/python3.9/dist-packages/netutils_linux_tuning/rx_buffers.py", line 41, in parse
    self.maximum, self.current = self.parse_ethtool_buffers()
  File "/usr/local/lib/python3.9/dist-packages/netutils_linux_tuning/rx_buffers.py", line 90, in parse_ethtool_buffers
    ethtool_buffers = self.run_ethtool('-g', 1).split('\n')
TypeError: a bytes-like object is required, not 'str'

Should this script even work with 3.9 python version?

# python3 --version
Python 3.9.2

# pip show netutils-linux
Name: netutils-linux
Version: 2.7.11
Summary: Bunch of utils to simplify linux network troubleshooting and performance tuning.
Home-page: https://github.com/strizhechenko/netutils-linux
Author: Oleg Strizhechenko
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python3.9/dist-packages
Requires: prettytable, colorama, argparse, ipaddress, pyyaml, six
Required-by:

# uname -a
Linux NAT-B-X1 5.10.0-8-amd64 #1 SMP Debian 5.10.46-3 (2021-07-28) x86_64 GNU/Linux

# ethtool -i enp1s0f0
driver: ixgbe
version: 5.10.0-8-amd64
firmware-version: 0x00012b2c
expansion-rom-version: 
bus-info: 0000:01:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
@strizhechenko
Copy link
Owner

Hi!
I didn't test it with py3.9, the last one was 3.6, but it's weird that it's broken — I don't think they have changed types of subprocesses output between 3.6 and 3.9.
Anyway I will try to check/fix it this evening, that shouldn't be really hard. Thank you for reporting the bug and providing detailed information about your environment! :)

@rayrapetyan
Copy link

Should be fixed by: #228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants