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:
The terminal you have selected in File > Configure terminal
The contents of stdout.txt if you start PyLNP with the command-line argument "-d" and open File > Configure terminal
Which desktop environment you're using (GNOME, Mate, Cinnamon, etc...)
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.
I don't have File > Configure Terminal, but I'm using GNOME Terminal 3.18.3
I can't find stdout.txt, but I have stdout.log. Here is the readout, also, I get this in my terminal. Again, I don't have File > Configure Terminal in GNOME Terminal 3.18.3
I am using Cinnamon 3.4.6
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).
Open a terminal and run the command export. When using Cinnamon, there should be an environment variable named GNOME_DESKTOP_SESSION_ID.
If there is no GNOME_DESKTOP_SESSION_ID, try running the command dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager. You should not get an error message from this.
Run gsettings get org.gnome.desktop.default-applications.terminal exec. It should return "gnome-terminal". If it does not, try gconftool-2 --get /desktop/gnome/applications/terminal/exec.
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:
Run PyLNP from a terminal using the -d switch (e.g. ./PyLNP -d)
Inside PyLNP, open File > Configure terminal
Close the Configure Terminal dialog and open File > Output log
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)
Get this error when selecting "Play Dwarf Fortress!"
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]
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".
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).
export
. When using Cinnamon, there should be an environment variable named GNOME_DESKTOP_SESSION_ID.dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager
. You should not get an error message from this.gsettings get org.gnome.desktop.default-applications.terminal exec
. It should return "gnome-terminal". If it does not, trygconftool-2 --get /desktop/gnome/applications/terminal/exec
.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:
https://pastebin.com/Tfn4Tg5g (GNOME_DESKTOP_SESSION_ID="this-is-deprecated")
https://pastebin.com/tH1vVTwy
https://pastebin.com/eEL4AV4A / https://pastebin.com/15dMkzbm
[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:
-d
switch (e.g../PyLNP -d
)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>>