Issues with missing positional arguments....

Tom Barber tom at analytical-labs.com
Fri Mar 4 09:59:25 UTC 2016


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
<http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/>
goal, but you can always help by sponsoring the project
<http://www.meteorite.bi/products/saiku/sponsorship>)

On 4 March 2016 at 00:57, Cory Johns <cory.johns at canonical.com> 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 <tom at analytical-labs.com>
> 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
>> <http://kickstarter.com/projects/2117053714/saiku-reporting-interactive-report-designer/>
>> goal, but you can always help by sponsoring the project
>> <http://www.meteorite.bi/products/saiku/sponsorship>)
>>
>> --
>> Juju mailing list
>> Juju at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20160304/f5eeaafb/attachment.html>


More information about the Juju mailing list