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

Program won't start, error: "TypeError: a bytes-like object is required, not 'str'" [potential fix included] #19

Open
TheOneWhoseUsernameWasTaken opened this issue May 30, 2021 · 0 comments

Comments

@TheOneWhoseUsernameWasTaken

When trying to run this on Linux Mint 20.1, I get the following error:

Call to __main__
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
app created: '<PyQt5.QtWidgets.QApplication object at 0x7fb978c47a60>'
Traceback (most recent call last):
  File "./procexp.py", line 573, in <module>
    g_reader = procreader.reader.procreader(int(g_settings["updateTimer"]), int(g_settings["historySampleCount"]))
  File "/path/to/procexp-master/procreader/reader.py", line 194, in __init__
    for line in data[0].split("\n"):
TypeError: a bytes-like object is required, not 'str'

I'm by no means a Python expert, but it seems as though changing line 194 in procreader/reader.py from:

        for line in data[0].split("\n"):

to:

        for line in data[0].decode().split("\n"):

solves the issue. The program appears to start fine now. Just wanted to let you know. Thanks for your work on this!

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

1 participant