You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.
Trying to build the shown container.yml seems to end in an AttributeError: 'dict' object has no attribute 'iteritems' error.
The following traceback seems to show that the build command tries to use the built-in iteritems() command instead of the from six import iteritems command. Since I didn't find an already open issue with this problem, it could be a local problem.
2017-05-20T22:46:36.795991 Call: Engine.run_conductor [container.docker.engine] args=('build', {'defaults': ordereddict(), 'version': '2', 'registries': CommentedMap(), 'settings': CommentedMap([('conductor_base', 'ubuntu:trusty'), ('pwd', '/tmp/testthing/contain')]), 'services': CommentedMap([('web', CommentedMap([('from', 'ubuntu:trusty'), ('ports', ['1280:80']), ('command', ['sleep', '120'])]))])}, '/tmp/testthing/contain', {'with_variables': [], 'no_conductor_runtime': True, 'debug': True, 'roles_path': None, 'selinux': True, 'local_python': False, 'subcommand': 'build', 'flatten': False, 'ansible_options': '', 'cache': True, 'with_volumes': [], 'purge_last': True, 'save_conductor_container': False, 'devel': False}) caller_file=/tmp/testthing/ansible-container/container/docker/engine.py caller_func=Engine.run_conductor caller_line=201 kwargs={}
2017-05-20T22:46:36.799345 Unknown exception 'dict' object has no attribute 'iteritems' [container.cli] caller_file=/tmp/testthing/containertest/lib/python3.5/site-packages/structlog/stdlib.py caller_func=exception caller_line=95
Traceback (most recent call last):
File "/tmp/testthing/ansible-container/container/cli.py", line 263, in __call__
getattr(core, u'hostcmd_{}'.format(args.subcommand))(**vars(args))
File "/tmp/testthing/ansible-container/container/__init__.py", line 28, in __wrapped__
return fn(*args, **kwargs)
File "/tmp/testthing/ansible-container/container/core.py", line 166, in hostcmd_build
'build', dict(config), base_path, kwargs, save_container=save_container)
File "/tmp/testthing/ansible-container/container/docker/engine.py", line 315, in await_conductor_command
conductor_id = self.run_conductor(command, config, base_path, params)
File "/tmp/testthing/ansible-container/container/docker/engine.py", line 82, in __wrapped__
return fn(self, *args, **kwargs)
File "/tmp/testthing/ansible-container/container/__init__.py", line 28, in __wrapped__
return fn(*args, **kwargs)
File "/tmp/testthing/ansible-container/container/docker/engine.py", line 211, in run_conductor
serialized_config = base64.b64encode(json.dumps(ordereddict_to_list(config)).encode("utf-8")).decode()
File "/tmp/testthing/ansible-container/container/__init__.py", line 28, in __wrapped__
return fn(*args, **kwargs)
File "/tmp/testthing/ansible-container/container/utils/__init__.py", line 273, in ordereddict_to_list
for key, value in config.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
I tried this with 2 different systems (they are both Ubuntu 16.04 though) and ended up with the same problem.
STEPS TO REPRODUCE
Run ansible-container build with the shown container.yml.
ansible-container build
EXPECTED RESULTS
A successful build of the shown container.
ACTUAL RESULTS
The said exception is raised and the build is aborted.
The text was updated successfully, but these errors were encountered:
I ran into this as well. Looks like this was merged a couple months ago, and is just waiting on a new release? Pasting in the error I caught in a Travis CI build for the benefit of future Google Searches I know I'll be making again :D
2017-06-30T04:18:30.474713 Unknown exception 'dict' object has no attribute 'iteritems' [container.cli] caller_file=/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/structlog/stdlib.py caller_func=exception caller_line=95
ISSUE TYPE
container.yml
OS / ENVIRONMENT
SUMMARY
Trying to build the shown container.yml seems to end in an
AttributeError: 'dict' object has no attribute 'iteritems'
error.The following traceback seems to show that the build command tries to use the built-in
iteritems()
command instead of thefrom six import iteritems
command. Since I didn't find an already open issue with this problem, it could be a local problem.I tried this with 2 different systems (they are both Ubuntu 16.04 though) and ended up with the same problem.
STEPS TO REPRODUCE
Run
ansible-container build
with the shown container.yml.EXPECTED RESULTS
A successful build of the shown container.
ACTUAL RESULTS
The said exception is raised and the build is aborted.
The text was updated successfully, but these errors were encountered: