Re: TypeError: could not convert 'AP' to type 'GArray_guchar_' when setting property 'NMSettingWireless.ssid'



On Thu, 2013-06-20 at 16:52 +0200, Radek Vykydal wrote:
Hello,

I am failing to construct connection argument for NMGtk.WifiDialog
in Python:

I don't seem to be able to set 'ssid' property of wireless 
setting(marked above):
s_wifi.set_property('ssid', ap.get_ssid())

getting:
TypeError: could not convert 'AP' to type 'GArray_guchar_' when setting 
property 'NMSettingWireless.ssid'

Interesting issue.  This is an inconsistency in the API which was
exposed by GObject Introspection bindings, since C doesn't have runtime
type safety and doesn't care when we try to do what you're doing.  We
have 3 different types for the SSID in libnm-util and libnm-glib, and
even though they are all the same underneath (GByteArray) the GOI
bindings cannot convert seamlessly between them.

I've spent a while trying to figure out how to work around this, but I
think we'll have to add some API to libnm-glib or libnm-util to convert
between the properties :(

Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]