AttributeError: 'ConfigData' object has no attribute 'get'

Bug #2033338 reported by Haw Loeung
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
charm-ubuntu-advantage
New
Undecided
Unassigned

Bug Description

Hi,

Trying to deploy this charm, getting this:

2023-08-29 03:12:58 INFO juju.worker.uniter resolver.go:155 awaiting error resolution for "config-changed" hook
2023-08-29 03:13:00 DEBUG unit.ubuntu-advantage/4.juju-log server.go:316 Operator Framework 1.5.3 up and running.
2023-08-29 03:13:00 DEBUG unit.ubuntu-advantage/4.juju-log server.go:316 Envvar 'no_proxy' => '127.0.0.1,localhost,::1'
2023-08-29 03:13:00 DEBUG unit.ubuntu-advantage/4.juju-log server.go:316 Envvar 'http_proxy' => ''
2023-08-29 03:13:00 DEBUG unit.ubuntu-advantage/4.juju-log server.go:316 Envvar 'https_proxy' => ''
2023-08-29 03:13:00 DEBUG unit.ubuntu-advantage/4.juju-log server.go:316 Emitting Juju event config_changed.
2023-08-29 03:13:00 INFO unit.ubuntu-advantage/4.juju-log server.go:316 Beginning config_changed
2023-08-29 03:13:00 ERROR unit.ubuntu-advantage/4.juju-log server.go:316 Uncaught exception while in charm code:
Traceback (most recent call last):
  File "./src/charm.py", line 195, in <module>
    main(UbuntuAdvantageCharm)
  File "/var/lib/juju/agents/unit-ubuntu-advantage-4/charm/venv/ops/main.py", line 438, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-ubuntu-advantage-4/charm/venv/ops/main.py", line 150, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-ubuntu-advantage-4/charm/venv/ops/framework.py", line 355, in emit
    framework._emit(event) # noqa
  File "/var/lib/juju/agents/unit-ubuntu-advantage-4/charm/venv/ops/framework.py", line 856, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-ubuntu-advantage-4/charm/venv/ops/framework.py", line 931, in _reemit
    custom_handler(event)
  File "./src/charm.py", line 98, in config_changed
    self._handle_ppa_state()
  File "./src/charm.py", line 108, in _handle_ppa_state
    ppa = self.config.get("ppa", "").strip()
AttributeError: 'ConfigData' object has no attribute 'get'
2023-08-29 03:13:00 ERROR juju.worker.uniter.operation runhook.go:153 hook "config-changed" (via hook dispatching script: dispatch) failed: exit status 1
2023-08-29 03:13:00 INFO juju.worker.uniter resolver.go:155 awaiting error resolution for "config-changed" hook

Tried setting the `ppa` config to `ppa:ua-client/stable` but still doesn't seem to help.

This is with r39.

Haw Loeung (hloeung)
description: updated
description: updated
Revision history for this message
Colin Misare (cmisare) wrote :

This looks like https://github.com/canonical/operator/issues/827 , and it's likely that re-building the charm for xenial pulling in ops 1.5.3 or newer will fix this issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.