Message12183

Author mohamad.mahajna
Recipients mohamad.mahajna
Date 2018-11-23.19:39:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1543001959.96.0.788709270274.issue2717@psf.upfronthosting.co.za>
In-reply-to
Content
how to pass **kwargs form java to python using Jython .

The python method :

def start_trex (self, f, d, block_to_success = True, timeout = 40, user = None, trex_development = False, **trex_cmd_options):

My java code :

Map<String, Object> kwargs = new HashMap<>();
kwargs.put("cfg","/etc/trex_cfg_stf.yaml");
boolean z =objectTrex.start_trex("astf/http_simple.py",20,true,40,"momham",true,kwargs);
I'm getting the following error :

Exception in thread "MainThread" TypeError: start_trex() takes at most 7 arguments (8 given)

although i passing just 7 arguments I think the problem with the way of passing the **kwargs argument
History
Date User Action Args
2018-11-23 19:39:20mohamad.mahajnasetrecipients: + mohamad.mahajna
2018-11-23 19:39:19mohamad.mahajnasetmessageid: <1543001959.96.0.788709270274.issue2717@psf.upfronthosting.co.za>
2018-11-23 19:39:19mohamad.mahajnalinkissue2717 messages
2018-11-23 19:39:18mohamad.mahajnacreate