Re: Issues with missing positional arguments....

2016-03-04 Thread Tom Barber
I have no idea, but, I did set the method to:

def check_running(java=None):

this morning which made the error go away, I assume because when its called
by update and change_config None takes over (python newbie remember).

Anyway, works for me.

Tom

--

Director Meteorite.bi - Saiku Analytics Founder
Tel: +44(0)5603641316

(Thanks to the Saiku community we reached our Kickstart

goal, but you can always help by sponsoring the project
)

On 4 March 2016 at 00:57, Cory Johns  wrote:

> As long as the state is only set by the interface layer, the handler will
> always get the relation instance passed in for that state, no matter what
> Juju hook it's currently running.  As before, I don't see anything obvious
> that would cause that error, so it will require some debugging.
>
> On Thu, Mar 3, 2016 at 5:28 PM, Tom Barber 
> wrote:
>
>> Evening all here's one that someone with more brains than me can answer:
>>
>> https://github.com/OSBI/layer-pdi/blob/master/reactive/pdi.py
>>
>> I'm having issues with this with the config-change and upgrade-charm hooks
>>
>> Both have a nasty habit of returning:
>>
>> 2016-03-03 22:25:44 INFO config-changed TypeError: check_running()
>> missing 1 required positional argument: 'java'
>> 2016-03-03 22:25:44 ERROR juju.worker.uniter.operation runhook.go:107
>> hook "config-changed" failed: exit status 1
>>
>> Me and Cory mulled it over without any great resolution last night, but
>> can someone explain why check_runnnig baulks. Is it because the Java layer
>> passes the java object but the config-changed and upgrade-hook don't and so
>> I need to split them out? or is there a nicer solution?
>>
>> Thanks
>>
>> Tom
>>
>> --
>>
>> Director Meteorite.bi - Saiku Analytics Founder
>> Tel: +44(0)5603641316
>>
>> (Thanks to the Saiku community we reached our Kickstart
>> 
>> goal, but you can always help by sponsoring the project
>> )
>>
>> --
>> Juju mailing list
>> Juju@lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Re: Issues with missing positional arguments....

2016-03-03 Thread Cory Johns
As long as the state is only set by the interface layer, the handler will
always get the relation instance passed in for that state, no matter what
Juju hook it's currently running.  As before, I don't see anything obvious
that would cause that error, so it will require some debugging.

On Thu, Mar 3, 2016 at 5:28 PM, Tom Barber  wrote:

> Evening all here's one that someone with more brains than me can answer:
>
> https://github.com/OSBI/layer-pdi/blob/master/reactive/pdi.py
>
> I'm having issues with this with the config-change and upgrade-charm hooks
>
> Both have a nasty habit of returning:
>
> 2016-03-03 22:25:44 INFO config-changed TypeError: check_running() missing
> 1 required positional argument: 'java'
> 2016-03-03 22:25:44 ERROR juju.worker.uniter.operation runhook.go:107 hook
> "config-changed" failed: exit status 1
>
> Me and Cory mulled it over without any great resolution last night, but
> can someone explain why check_runnnig baulks. Is it because the Java layer
> passes the java object but the config-changed and upgrade-hook don't and so
> I need to split them out? or is there a nicer solution?
>
> Thanks
>
> Tom
>
> --
>
> Director Meteorite.bi - Saiku Analytics Founder
> Tel: +44(0)5603641316
>
> (Thanks to the Saiku community we reached our Kickstart
> 
> goal, but you can always help by sponsoring the project
> )
>
> --
> Juju mailing list
> Juju@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju


Issues with missing positional arguments....

2016-03-03 Thread Tom Barber
Evening all here's one that someone with more brains than me can answer:

https://github.com/OSBI/layer-pdi/blob/master/reactive/pdi.py

I'm having issues with this with the config-change and upgrade-charm hooks

Both have a nasty habit of returning:

2016-03-03 22:25:44 INFO config-changed TypeError: check_running() missing
1 required positional argument: 'java'
2016-03-03 22:25:44 ERROR juju.worker.uniter.operation runhook.go:107 hook
"config-changed" failed: exit status 1

Me and Cory mulled it over without any great resolution last night, but can
someone explain why check_runnnig baulks. Is it because the Java layer
passes the java object but the config-changed and upgrade-hook don't and so
I need to split them out? or is there a nicer solution?

Thanks

Tom

--

Director Meteorite.bi - Saiku Analytics Founder
Tel: +44(0)5603641316

(Thanks to the Saiku community we reached our Kickstart

goal, but you can always help by sponsoring the project
)
-- 
Juju mailing list
Juju@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju