I'm having some difficulty with scopes in juju 2.0 (2.0-rc1-0ubuntu1~1) and the documentation doesn't go into much detail.
I've written an interface at https://github.com/autonomouse/interface-weebl using the global scope (or so I thought).
I've got 2 charms and have set the interface in the appropriate provides/requires as "oildashboard".
One charm is called "weebl" and a second mock charm that I'm using for testing called "anti-weebl". Anti-weebl doesn't do much except to display the a piece of info passed to it in it's juju status message, like this:
@when('oildashboard.available')
def display_data_in_status(oildashboard):
hookenv.status_set('active', oildashboard.weebl_username())
It seemed to be working yesterday, happily dispaying data in the juju status, but now that I have involved a second relation to a third charm from weebl, I get ValueError: Conversation with scope 'anti-weebl' not found.
Can anyone shed some light on what I'm doing wrong wrt global scopes please?
This is the full error (after I removed the unit-weebl-1: 14:54:29 INFO unit.weebl/1.oildashboard-relation-joined from the beginning of every line):
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-weebl-1/charm/hooks/oildashboard-relation-joined", line 19, in <module>
main()
File "/usr/local/lib/python3.5/dist-packages/charms/reactive/__init__.py", line 78, in main
bus.dispatch()
File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 434, in dispatch
_invoke(other_handlers)
File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 417, in _invoke
handler.invoke()
File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 291, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-weebl-1/charm/reactive/weebl.py", line 52, in request_db
pgsql.set_remote('extensions', 'tablefunc')
File "/usr/local/lib/python3.5/dist-packages/charms/reactive/relations.py", line 323, in set_remote
self.conversation(scope).set_remote(key, value, data, **kwdata)
File "/usr/local/lib/python3.5/dist-packages/charms/reactive/relations.py", line 263, in conversation
raise ValueError("Conversation with scope '%s' not found" % scope)
ValueError: Conversation with scope 'anti-weebl' not found
unit-weebl-1: 14:54:29 ERROR juju.worker.uniter.operation hook "oildashboard-relation-joined" failed: exit status 1
unit-weebl-1: 14:54:29 INFO juju.worker.uniter awaiting error resolution for "relation-joined" hook