You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to launch pylnp from source-- that is, using launch.py rather than the compiled binary-- with Python 3 on Fedora. It worked until I actually tried to launch DF, at which point I got this traceback:
Traceback (most recent call last):
File "/home/bjr/.pylnp/pylnp/tkgui/tkgui.py", line 542, in run_df
launcher.run_df()
File "/home/bjr/.pylnp/pylnp/core/launcher.py", line 52, in run_df
result = run_program(executable, force, True, spawn_terminal)
File "/home/bjr/.pylnp/pylnp/core/launcher.py", line 91, in run_program
run_args = terminal.get_terminal_command([path,])
File "/home/bjr/.pylnp/pylnp/core/terminal.py", line 25, in get_terminal_command
term = get_configured_terminal().get_command_line()
File "/home/bjr/.pylnp/pylnp/core/terminal.py", line 125, in get_command_line
'\n', '')
TypeError: a bytes-like object is required, not 'str'
The KDETerminal implementation of get_command_line looks like this:
I was able to fix this by just changing the arguments to .replace() to be binary strings (e.g. “b'\n' and b''). Not sure if there’s a more elegant thing to do here. And looking at some of the other code in this module, they seem to have similar looking code, which suggests to me other places might have this problem too.
[Issue created by TC01: 2019-09-15]
[Last updated on bitbucket: 2020-04-04]
[Comment created by Pidgeot: 2019-09-15]
I’ll have to verify it doesn’t break other Python versions, but otherwise it seems like a reasonable enough change.
Just for reference, can you check exactly which version of Python you’re running?
[Comment created by TC01: 2019-09-15]
Sure! I’m using Python 3.7.4 here.
[Comment created by McArcady: 2020-04-04]
This problem may be fixed by the github PR#3 #3, that fixes some terminal handling issues with python3 on Linux.
I’ve not tested it with the KDE Terminal though.
[Comment created by Pidgeot: 2020-04-04]
I’ve merged the pull request over on Github, it’ll appear on Bitbucket shortly.
I'm in the process of migrating over the Bitbucket issues now, so please open a new issue over on Github if this happens again.
The text was updated successfully, but these errors were encountered:
I tried to launch pylnp from source-- that is, using launch.py rather than the compiled binary-- with Python 3 on Fedora. It worked until I actually tried to launch DF, at which point I got this traceback:
The KDETerminal implementation of get_command_line looks like this:
I was able to fix this by just changing the arguments to .replace() to be binary strings (e.g. “b'\n' and b''). Not sure if there’s a more elegant thing to do here. And looking at some of the other code in this module, they seem to have similar looking code, which suggests to me other places might have this problem too.
[Issue created by TC01: 2019-09-15]
[Last updated on bitbucket: 2020-04-04]
[Comment created by Pidgeot: 2019-09-15]
I’ll have to verify it doesn’t break other Python versions, but otherwise it seems like a reasonable enough change.
Just for reference, can you check exactly which version of Python you’re running?
[Comment created by TC01: 2019-09-15]
Sure! I’m using Python 3.7.4 here.
[Comment created by McArcady: 2020-04-04]
This problem may be fixed by the github PR#3 #3, that fixes some terminal handling issues with python3 on Linux.
I’ve not tested it with the KDE Terminal though.
[Comment created by Pidgeot: 2020-04-04]
I’ve merged the pull request over on Github, it’ll appear on Bitbucket shortly.
I'm in the process of migrating over the Bitbucket issues now, so please open a new issue over on Github if this happens again.
The text was updated successfully, but these errors were encountered: