TypeError: super object is not an iterator

Bug #1426020 reported by Andreas Hasenack on 2015-02-26
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-jujuclient
Critical
Kapil Thangavelu

Bug Description

python-jujuclient r53 built from lp:python-jujuclient.
juju-core 1.21.3-trusty-amd64
deployer 0.4.3+bzr136+43~ubuntu14.04.1

Here is a reproducer:

andreas@nsn7:~/xxx$ cat simple-postgresql.yaml
mypostgresql:
    services:
        postgresql:
            charm: cs:trusty/postgresql-3
            constraints: mem=2048
            options:
                extra-packages: python-apt postgresql-contrib postgresql-.*-debversion
                max_connections: 500

        postgresql-psql:
            charm: cs:trusty/postgresql-psql

    relations:
        - ["postgresql:db-admin", "postgresql-psql:db-admin"]

andreas@nsn7:~/xxx$ juju-deployer -Wdv -c simple-postgresql.yaml -l
2015-02-26 13:50:29 [DEBUG] deployer.cli: Using runtime GoEnvironment on local
mypostgresql
andreas@nsn7:~/xxx$ juju-deployer -Wdv -c simple-postgresql.yaml -u mypostgresql
2015-02-26 13:50:35 [DEBUG] deployer.cli: Using runtime GoEnvironment on local
2015-02-26 13:50:35 [INFO] deployer.cli: Starting deployment of mypostgresql
2015-02-26 13:50:35 [DEBUG] deployer.import: Getting charms...
2015-02-26 13:50:35 [DEBUG] deployer.charm: Cache dir /home/andreas/.juju/.deployer-store-cache/cs_trusty_postgresql-3
2015-02-26 13:50:35 [DEBUG] deployer.charm: Cache dir /home/andreas/.juju/.deployer-store-cache/cs_trusty_postgresql-psql
2015-02-26 13:50:36 [DEBUG] deployer.charm: Retrieving store charm cs:trusty/postgresql-psql-1
2015-02-26 13:50:38 [DEBUG] deployer.deploy: Resolving configuration
2015-02-26 13:50:38 [DEBUG] deployer.env: Connecting to environment...
2015-02-26 13:50:38 [DEBUG] deployer.env: Connected to environment
2015-02-26 13:50:38 [INFO] deployer.import: Deploying services...
2015-02-26 13:50:38 [DEBUG] deployer.import: <deployer.env.go.GoEnvironment object at 0x7fc876b16ad0>
2015-02-26 13:50:39 [INFO] deployer.import: Deploying service postgresql using cs:trusty/postgresql-3
2015-02-26 13:50:46 [INFO] deployer.import: Deploying service postgresql-psql using cs:trusty/postgresql-psql
2015-02-26 13:50:57 [DEBUG] deployer.import: Adding units...
2015-02-26 13:50:58 [DEBUG] deployer.import: Service 'postgresql' does not need any more units added.
2015-02-26 13:50:58 [DEBUG] deployer.import: Service 'postgresql-psql' does not need any more units added.
2015-02-26 13:50:58 [DEBUG] deployer.import: Waiting for units before adding relations
Traceback (most recent call last):
  File "/usr/bin/juju-deployer", line 9, in <module>
    load_entry_point('juju-deployer==0.4.4', 'console_scripts', 'juju-deployer')()
  File "/usr/lib/python2.7/dist-packages/deployer/cli.py", line 135, in main
    run()
  File "/usr/lib/python2.7/dist-packages/deployer/cli.py", line 233, in run
    importer.Importer(env, deployment, options).run()
  File "/usr/lib/python2.7/dist-packages/deployer/action/importer.py", line 206, in run
    self.wait_for_units(ignore_errors=ignore_errors)
  File "/usr/lib/python2.7/dist-packages/deployer/action/importer.py", line 181, in wait_for_units
    services=self.deployment.get_service_names(), on_errors=on_errors)
  File "/usr/lib/python2.7/dist-packages/deployer/env/go.py", line 227, in wait_for_units
    services=services, on_errors=on_errors).run(callback)
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 1916, in run
    for change_set in self.watch:
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 402, in next
    return next(super(TimeoutWatcher, self))
TypeError: super object is not an iterator

Adam Collard (adam-collard) wrote :
David Britton (davidpbritton) wrote :

Tested patch, confirmed fixed on on py2.7 deployer, also tested with python 3 like this:

>>> import jujuclient
>>> jujuclient.Environment.connect("my-juju-env-name").watch(timeout=10).next()
[BIG DATA STRUCTURE HERE]

Changed in python-jujuclient:
importance: Undecided → Critical
status: New → Fix Released
assignee: nobody → Kapil Thangavelu (hazmat)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers