http://www.perlmonks.org?node_id=1086955

neilwatson has asked for the wisdom of the Perl Monks concerning the following question:

Greetings,

I'm attempting to remove a cobbler profile using Frontier::Client. I get the error:

Fault returned from XML RPC Server, fault code 1: <type 'exceptions.TypeError'>:cannot marshal None unless allow_none is + enabled

I can't see any way to enable the allow_none setting. I tried passing allow_none => "True" in the new call, but error persisted. What can I do?

$server = Frontier::Client->new( url => $server_url ); ... $server->call( 'remove_profile', $profile_name, $token, "True" ) or die "Could not delete system $profile_name, $!";

Update

I switched to XMLRPC::Lite and the error did not return.

Neil Watson
watson-wilson.ca

Replies are listed 'Best First'.
Re: How to enable allow_none in Frontier::Client
by igelkott (Priest) on May 25, 2014 at 07:59 UTC

    Some Python code seems to have allow_none but I didn't see any simple way to pass allow_none through Frontier::Client. The source code made some references to the use of None but it seem to be just about default fonts.

    It has been suggested that the type mismatch happens where "None" is used instead of "False". I don't see exactly where this might happen but maybe you'll be able to identify something with in debug mode (ie, passing the debug switch to Frontier::Client->new).

    Of course, you still not be able to fix it without changing source code so it might even be easier to modify Frontier::Client to pass allow_none, exactly like it does the other options. Could make a feature request -- this module was last updated 10 years ago but the author could be listening.