[Airship-discuss] if document.get('schema', '') == SCHEMA_SCHEMA: AttributeError: 'NoneType' object has no attribute 'get'

SUGGUNA, NAGA ns156u at att.com
Wed Aug 22 19:15:19 UTC 2018


While generating promgen I see following error, I verified the site.yaml for empty documents and I found and some, after fixing them also I see the same error.

+ gen_bundle
++ pwd
+ docker run --env http_proxy=http://one.proxy.att.com:8888/ --env https_proxy=http://one.proxy.att.com:8888/ --user 0 --rm -t -w /target -v /root/yaml_builds:/target quay.io/airshipit/promenade:009f3de7ecf6afcdd2783ac7a12470394d7dfab3 promenade build-all --validators -o /target/tars/dellgen10/configs/promenade-bundle '/target/tars/dellgen10/configs/promenade/*.yaml'
+ PORT=9000
+ UWSGI_TIMEOUT=300
+ PROMENADE_THREADS=1
+ PROMENADE_WORKERS=4
+ '[' promenade = server ']'
+ exec promenade build-all --validators -o /target/tars/dellgen10/configs/promenade-bundle /target/tars/dellgen10/configs/promenade/global.yaml /target/tars/dellgen10/configs/promenade/site.yaml
2018-08-22 19:03:15,525 INFO     - - - promenade.config:from_streams [ 55] Loading documents from /target/tars/dellgen10/configs/promenade/global.yaml
2018-08-22 19:03:22,244 INFO     - - - promenade.config:from_streams [ 59] Successfully loaded 173 documents from /target/tars/dellgen10/configs/promenade/global.yaml
2018-08-22 19:03:22,245 INFO     - - - promenade.config:from_streams [ 55] Loading documents from /target/tars/dellgen10/configs/promenade/site.yaml
2018-08-22 19:03:24,975 INFO     - - - promenade.config:from_streams [ 59] Successfully loaded 120 documents from /target/tars/dellgen10/configs/promenade/site.yaml
2018-08-22 19:03:24,975 INFO     - - - promenade.config:__init__ [ 24] Parsing document schemas.
Traceback (most recent call last):
  File "/usr/local/bin/promenade", line 11, in <module>
    load_entry_point('promenade', 'console_scripts', 'promenade')()
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/promenade/promenade/cli.py", line 42, in build_all
    streams=config_files)
  File "/opt/promenade/promenade/config.py", line 62, in from_streams
    return cls(documents=documents, **kwargs)
  File "/opt/promenade/promenade/config.py", line 25, in __init__
    schema_set = validation.load_schemas_from_docs(documents)
  File "/opt/promenade/promenade/validation.py", line 95, in load_schemas_from_docs
    if document.get('schema', '') == SCHEMA_SCHEMA:
AttributeError: 'NoneType' object has no attribute 'get'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.airshipit.org/pipermail/airship-discuss/attachments/20180822/1bcbe2dc/attachment-0001.html>


More information about the Airship-discuss mailing list