Closed ChrisMacNaughton closed 4 years ago
This seems to happen when there is a system level charmhelpers install
Since we are appending lib/ to sys.path, existing charmhelpers takes precedence.
@xavpaice I'll update this to use sys.path.insert(), but you should look into your template for other charms as well.
Resolved with commit 0f9a7ddf. I'll push the new charm after all tests finish successfully.
2020-06-08 12:00:52 DEBUG juju.worker.uniter.runner runner.go:595 starting jujuc server {unix @/var/lib/juju/agents/unit-lldpd-0/agent.socket}
2020-06-08 12:00:53 DEBUG leader-elected Traceback (most recent call last):
2020-06-08 12:00:53 DEBUG leader-elected File "/var/lib/juju/agents/unit-lldpd-0/charm/hooks/leader-elected", line 26, in
2020-06-08 12:00:53 DEBUG leader-elected from charmhelpers import fetch # noqa: E402
2020-06-08 12:00:53 DEBUG leader-elected File "/usr/local/lib/python3.8/dist-packages/charmhelpers/fetch/init.py", line 75, in
2020-06-08 12:00:53 DEBUG leader-elected platform = get_platform()
2020-06-08 12:00:53 DEBUG leader-elected File "/usr/local/lib/python3.8/dist-packages/charmhelpers/osplatform.py", line 11, in get_platform
2020-06-08 12:00:53 DEBUG leader-elected tuple_platform = platform.linux_distribution()
2020-06-08 12:00:53 DEBUG leader-elected AttributeError: module 'platform' has no attribute 'linux_distribution'
2020-06-08 12:00:53 ERROR juju.worker.uniter.operation runhook.go:132 hook "leader-elected" failed: exit status 1