Pidgeot / python-lnp

Cross-platform re-implementation of the Lazy Newb Pack launcher.
ISC License
65 stars 10 forks source link

[Linux] "Play Dwarf Fortress!" Not working #164

Open Pidgeot opened 4 years ago

Pidgeot commented 4 years ago

Get this error when selecting "Play Dwarf Fortress!"

#!
Exception in Tkinter callback
Traceback (most recent call last):
  File "/home/michael/Desktop/df/python_lnp/build/lnp/out00-PYZ.pyz/Tkinter", line 1532, in __call__
  File "/home/michael/Desktop/df/python_lnp/build/lnp/out00-PYZ.pyz/core.launcher", line 52, in run_df
  File "/home/michael/Desktop/df/python_lnp/build/lnp/out00-PYZ.pyz/core.launcher", line 93, in run_program
  File "/home/michael/Desktop/df/python_lnp/build/lnp/out00-PYZ.pyz/core.terminal", line 31, in get_terminal_command
TypeError: coercing to Unicode: need string or buffer, list found

Did some looking, and apparently I'm not the only one with this issue, however, I am unable to find a working solution.

Sorry for duplicate, but I did not double check my formatting.

[Issue created by Former user: 2017-09-08] [Last updated on bitbucket: 2017-11-23]

[Comment created by Xioms: 2017-09-08] I submitted this issue.

To give a bit more info, I'm running Linux Mint 18.2, which is based on Ubuntu 16.04.

I'm on Python 2.7.12 and Python 3.5.2. I don't know which is favored when it comes to PyLNP.

I also have Readline 6.3-8ubuntu2 installed. I hear that can cause issues.

Any other info, I would be more than happy to provide.

[Comment created by Pidgeot: 2017-09-09] First, I would suggest you download an updated binary - the log shows you are running 0.12a, and I fixed some terminal-related bugs in 0.12b, so that might be enough to resolve your problem.

If not, I'd like to know the following:

That way, it should be a lot easier to figure out why it's failing.

[Comment created by Xioms: 2017-09-13] I tried at first on 0.12b, and got the same thing. I read somewhere that 0.12a fixed some issues, so I decided it was worth trying to downgrade to 0.12a. Nothing changed, however.

Also, I apologise for the late reply.

[Comment created by Pidgeot: 2017-09-13]

I don't have File > Configure Terminal

That should always be available if your OS is detected as Linux (and according to the stderr.txt you uploaded, it is). You are looking in PyLNP, right? It should be right below "Restore default settings".

I'm using GNOME Terminal 3.18.3

GNOME, specifically, was fixed in 0.12b, since they changed how to detect the correct terminal in the latest version. I know Cinnamon is based on GNOME, so it might need the same fix - there isn't currently special handling for Cinnamon, though, so I'll try to find a distro with a matching version to double-check.

[Comment created by Xioms: 2017-09-13] My mistake. I was not looking at PyLNP.

In "File > Configure terminal" I get a dialog box asking which terminal to use with a drop-down list only containing the option "Custom command". There is no custom command entered.

I have returned to using 0.12b, by the way. I still receive the same issue.

[Comment created by Pidgeot: 2017-09-13] Alright, if that's the only option, then that means it didn't actually detect any terminals - detecting the right terminal isn't standardized on Linux, so it probably needs special handling for Cinnamon.

You can put "nohup gnome-terminal -x" in that box (without quotes), and then it should start DF correctly.

I'll try to find a way to auto-detect the right command for a later version.

[Comment created by Xioms: 2017-09-13] Very good! It works just as described. Thank you.

[Comment created by Pidgeot: 2017-09-16] I just installed a VM with Linux Mint 18 and Cinnamon 3.4.3 and the GNOME detection works out of the box (using PyLNP 0.12b - it shows up as one of the options in the Configure terminal dialog. As far as I can tell, Cinnamon is supposed to just work like this, so I'm not sure why it might not work for you (at least not in 0.12b).

If you're willing to run a few tests it might be possible to figure something more out, but otherwise there isn't much I can do on the detection side.

[Comment created by Pidgeot: 2017-09-16] Issue #147 was marked as a duplicate of this issue.

[Comment created by Xioms: 2017-09-20] I made a fresh install of Linux Mint 18.2 Cinnamon, and GNOME still isn't appearing... I'd be happy to help you with any tests.

[Comment created by Pidgeot: 2017-09-20] If you can do the following, this will be helpful in determining what is going wrong. After running each command, please copy the full output in here (you can anonymize user names and such if you want, but try not to change more than strictly necessary).

The commands basically replicate the same commands that PyLNP is running, so by looking at the output, I may be able to determine what's going wrong.

If all of these tests fail, I may need you to run more commands later on... but let's start with the current logic and figure out if at least part of it works.

[Comment created by Xioms: 2017-09-21] Here you go! I'm not savvy enough to recognize if it failed or not, but here are all the results:

[Comment created by Pidgeot: 2017-10-15] Hm, all of that should work - they're the same commands PyLNP will try to execute.

Can you please do the following:

You'll see a window with two text fields; one of them will contain a bunch of lines with "Checking for terminal". Copy the contents of that one in here.

[Comment created by Pidgeot: 2017-11-23] Try to improve detection of Cinnamon terminal (see #148)

→ <<cset 21c0d25012fc>>