Skip to content

AttributeError: 'ClientConnection' object has no attribute 'open' #1207

Open
@freyes

Description

Description

When trying to use zaza with juju 2.9 and a latest version of websockets the following exception is raised due to changes in the library.

Traceback (most recent call last):                                                                                                                                             
  File "/home/ubuntu/charms/charm-mysql-innodb-cluster/src/.tox/func-target/lib/python3.10/site-packages/juju/client/connection.py", line 834, in _connect_with_login
    result = (await self.login())['response']                                                                                                                                  
  File "/home/ubuntu/charms/charm-mysql-innodb-cluster/src/.tox/func-target/lib/python3.10/site-packages/juju/client/connection.py", line 923, in login
    return await self.rpc({                                                                                                                                                    
  File "/home/ubuntu/charms/charm-mysql-innodb-cluster/src/.tox/func-target/lib/python3.10/site-packages/juju/client/connection.py", line 606, in rpc
    if self.monitor.status == Monitor.DISCONNECTED:                                                                                                                            
  File "/home/ubuntu/charms/charm-mysql-innodb-cluster/src/.tox/func-target/lib/python3.10/site-packages/juju/client/connection.py", line 212, in status
    if stopped or not connection._ws.open:                                                                                                                                     
AttributeError: 'ClientConnection' object has no attribute 'open'

Urgency

Annoying bug in our test suite

Python-libjuju version

2.9.49

Juju version

2.9.49

Reproduce / Test

git clone https://opendev.org/openstack/charm-mysql-innodb-cluster.git
cd charm-mysql-innodb-cluster
tox -e func-target

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugindicates a bug in the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions