Hi,

On 15.08.2013 23:18, luke bonham wrote:
Hi everyone, I was trying to get to work 'termfair' layout from this
good old module: https://github.com/vain/awesome-vain

This is what I got: http://pastebin.com/gecFkxj0

However I keep getting this error:

"/usr/share/lua/5.2/lgi/override/Pango.lua:60: bad argument #3 to 
'pango_layout_set_text' (string expected, got nil)"

and I don't understand how it's caused and how could I fix it.

Any clue?

You are calling box:set_text(nil) somewhere on a wibox.widget.textbox, but "nil" is not a valid string. This used to work in 3.4. However, no idea where you are doing this and I can't really see from your provided pastes.

I would suggest a hack like this:

local PL = require("lgi").Pango.Layout
local set_text = PL.set_text
function PL._method:set_text(text, len)
  if text == nil then
    print(debug.traceback())
  end
  return set_text(self, text, len)
end

That should print a traceback right before the error so that you can see where this "nil" is coming from.

Cheers,
Uli

--
To unsubscribe, send mail to [email protected].

Reply via email to