compose icon indicating copy to clipboard operation
compose copied to clipboard

'NoneType' object has no attribute 'get'

Open watnotte opened this issue 10 years ago • 5 comments

I just upgraded to the latest beta version:

docker -v
Docker version 1.12.3, build 6b644ec, experimental

docker-compose -v
docker-compose version 1.9.0-rc2, build a2da43b

docker-compose was working fine just previous to the upgrade but now it just spits out:

docker-compose up
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "compose/cli/main.py", line 65, in main
  File "compose/cli/main.py", line 114, in perform_command
  File "compose/cli/command.py", line 36, in project_from_options
  File "compose/cli/command.py", line 103, in get_project
  File "compose/config/config.py", line 323, in load
  File "compose/config/config.py", line 416, in load_services
  File "compose/config/config.py", line 395, in build_services
  File "compose/config/config.py", line 380, in build_service
  File "compose/config/config.py", line 484, in run
  File "compose/config/config.py", line 528, in resolve_extends
  File "compose/config/config.py", line 774, in merge_service_dicts
  File "compose/config/config.py", line 728, in merge_field
  File "compose/config/config.py", line 807, in merge_logging
  File "compose/config/config.py", line 750, in merge_scalar
AttributeError: 'NoneType' object has no attribute 'get'
docker-compose returned -1

watnotte avatar Nov 02 '16 18:11 watnotte

Thanks for the report! Can you share your compose file(s) so we can pinpoint the issue?

shin- avatar Nov 02 '16 21:11 shin-

I have the same issue. I seem to have problem attaching the files docker-compose.yml:

version: '2' services: busy: image: busybox logging: driver: json-file options: max-file: "5" max-size: "100m"

docker-compose.yml: version: '2'

those are the smallest i managed to create that reproduce this issue, seems to be related to the logging part (atleast in my own configuration)

srgrn avatar Nov 03 '16 13:11 srgrn

I'm seeing a very similar issue. Same error message. I'm only seeing it when I add a service that extends another though. If I take the new service out of the docker-compose.yml file, it works fine. Any ideas? Docker version 1.12.3, build 6b644ec docker-compose version 1.9.0-rc2, build a2da43b

awesomescot-zz avatar Nov 04 '16 19:11 awesomescot-zz

@awesomescot Does the service you're overriding have a logging section in either the base or override? If so, #4113 fixes this. As a workaround until that fix makes it into a release, you can define an empty logging: {} section where it's absent.

shin- avatar Nov 04 '16 19:11 shin-

Yes, the parent service has a logging section. I've given up on the extends. But thanks for the help.

awesomescot-zz avatar Nov 04 '16 19:11 awesomescot-zz