tosca-comment

 View Only
  • 1.  error when using tosca parser

    Posted 10-31-2017 10:35
    Dears,

    I have started using toscaparser and I got this error message:
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py
    <http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>",
    line 101, in __init__
    self.topology_template = self._topology_template()
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py
    <http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>",
    line 120, in _topology_template
    None)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/topo
    logy_template.py
    <http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>",
    line 61, in __init__
    self.groups = self._groups()
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/topo
    logy_template.py
    <http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>",
    line 163, in _groups
    self.custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py
    <http://disq.us/url?url=http%3A%2F%2Fgroups.py%3Aw39ewnjXnnqwMHqHdggvOnHYhag&cuid=4521329>",
    line 29, in __init__
    custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/entity_template.py
    <http://disq.us/url?url=http%3A%2F%2Fentity_template.py%3AY8gjryCOp0cPFritv9csZZksA04&cuid=4521329>",
    line 74, in __init__
    if type is not None else None
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/
    grouptype.py
    <http://disq.us/url?url=http%3A%2F%2Fgrouptype.py%3AipHWAamxbESI9sEAJ6WNzO3tQsY&cuid=4521329>",
    line 35, in __init__
    if self.DESCRIPTION in self.defs:
    TypeError: argument of type 'NoneType' is not iterable

    Kindly find attached my input file.
    I would appreciate any kind of help.
    Thanks in advance.
    best regards.



  • 2.  RE: [tosca-comment] error when using tosca parser

    Posted 10-31-2017 10:55
    Hi David,

    You need to include the version :

    tosca_definitions_version tosca_simple_profile_for_nfv_1_0_0


    HTH
    Manas

    From: tosca-comment@lists.oasis-open.org [mailto:tosca-comment@lists.oasis-open.org] On Behalf Of David Gabriel
    Sent: 31 October 2017 16:05
    To: tosca-comment@lists.oasis-open.org
    Subject: [tosca-comment] error when using tosca parser

    Dears,

    I have started using toscaparser and I got this error message:
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py<http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>", line 101, in __init__
    self.topology_template = self._topology_template()
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py<http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>", line 120, in _topology_template
    None)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py<http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>", line 61, in __init__
    self.groups = self._groups()
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py<http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>", line 163, in _groups
    self.custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py<http://disq.us/url?url=http%3A%2F%2Fgroups.py%3Aw39ewnjXnnqwMHqHdggvOnHYhag&cuid=4521329>", line 29, in __init__
    custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/entity_template.py<http://disq.us/url?url=http%3A%2F%2Fentity_template.py%3AY8gjryCOp0cPFritv9csZZksA04&cuid=4521329>", line 74, in __init__
    if type is not None else None
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/grouptype.py<http://disq.us/url?url=http%3A%2F%2Fgrouptype.py%3AipHWAamxbESI9sEAJ6WNzO3tQsY&cuid=4521329>", line 35, in __init__
    if self.DESCRIPTION in self.defs:
    TypeError: argument of type 'NoneType' is not iterable

    Kindly find attached my input file.
    I would appreciate any kind of help.
    Thanks in advance.
    best regards.




  • 3.  Re: [tosca-comment] error when using tosca parser

    Posted 10-31-2017 11:12
    Thanks so much for your help.
    When I include the proposed line, I removed also the first one of my input
    file.
    However, I got the below errors. Do you have any other remarks regarding my
    input file ?

    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py",
    line 81, in __init__
    self.tpl = YAML_LOADER(self.path, self.a_file)
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/utils/yamlparser.py",
    line 50, in load_yaml
    return yaml.load(f.read(), Loader=yaml_loader)
    File "/usr/local/lib/python2.7/dist-packages/yaml/__init__.py", line 71,
    in load
    return loader.get_single_data()
    File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line
    37, in get_single_data
    node = self.get_single_node()
    File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 36,
    in get_single_node
    document = self.compose_document()
    File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 58,
    in compose_document
    self.get_event()
    File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 118,
    in get_event
    self.current_event = self.state()
    File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 193,
    in parse_document_end
    token = self.peek_token()
    File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 128,
    in peek_token
    self.fetch_more_tokens()
    File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 220,
    in fetch_more_tokens
    return self.fetch_value()
    File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 576,
    in fetch_value
    self.get_mark())
    ScannerError: mapping values are not allowed here
    in "<unicode string>", line 4, column 12:
    description: example for a NSD.
    ^


    Thanks in advance.

    2017-10-31 11:54 GMT+01:00 Manas Mal <MMal@advaoptical.com>:

    > Hi David,
    >
    >
    >
    > You need to include the version :
    >
    >
    >
    > tosca_definitions_version tosca_simple_profile_for_nfv_1_0_0
    >
    >
    >
    >
    >
    > HTH
    >
    > Manas
    >
    >
    >
    > *From:* tosca-comment@lists.oasis-open.org [mailto:tosca-comment@lists.
    > oasis-open.org] *On Behalf Of *David Gabriel
    > *Sent:* 31 October 2017 16:05
    > *To:* tosca-comment@lists.oasis-open.org
    > *Subject:* [tosca-comment] error when using tosca parser
    >
    >
    >
    > Dears,
    >
    >
    >
    > I have started using toscaparser and I got this error message:
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>",
    > line 101, in __init__
    > self.topology_template = self._topology_template()
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>",
    > line 120, in _topology_template
    > None)
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/topo
    > logy_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>",
    > line 61, in __init__
    > self.groups = self._groups()
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/topo
    > logy_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>",
    > line 163, in _groups
    > self.custom_defs)
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py
    > <http://disq.us/url?url=http%3A%2F%2Fgroups.py%3Aw39ewnjXnnqwMHqHdggvOnHYhag&cuid=4521329>",
    > line 29, in __init__
    > custom_defs)
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/enti
    > ty_template.py
    > <http://disq.us/url?url=http%3A%2F%2Fentity_template.py%3AY8gjryCOp0cPFritv9csZZksA04&cuid=4521329>",
    > line 74, in __init__
    > if type is not None else None
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/
    > grouptype.py
    > <http://disq.us/url?url=http%3A%2F%2Fgrouptype.py%3AipHWAamxbESI9sEAJ6WNzO3tQsY&cuid=4521329>",
    > line 35, in __init__
    > if self.DESCRIPTION in self.defs:
    > TypeError: argument of type 'NoneType' is not iterable
    >
    >
    >
    > Kindly find attached my input file.
    >
    > I would appreciate any kind of help.
    > Thanks in advance.
    >
    > best regards.
    >
    >
    >



  • 4.  RE: [tosca-comment] error when using tosca parser

    Posted 10-31-2017 11:22

    I assume you have given in this format:

    tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0


    Also remove the “”import”” as you are not using this.


    Please attach your yaml file.

    Thanks,
    Manas
    From: David Gabriel [mailto:davidgab283@gmail.com]
    Sent: 31 October 2017 16:42
    To: Manas Mal <MMal@advaoptical.com>
    Cc: tosca-comment@lists.oasis-open.org
    Subject: Re: [tosca-comment] error when using tosca parser

    Thanks so much for your help.
    When I include the proposed line, I removed also the first one of my input file.
    However, I got the below errors. Do you have any other remarks regarding my input file ?

    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py", line 81, in __init__
    self.tpl = YAML_LOADER(self.path, self.a_file)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/utils/yamlparser.py", line 50, in load_yaml
    return yaml.load(f.read(), Loader=yaml_loader)
    File "/usr/local/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load
    return loader.get_single_data()
    File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
    node = self.get_single_node()
    File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
    File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 58, in compose_document
    self.get_event()
    File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 118, in get_event
    self.current_event = self.state()
    File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 193, in parse_document_end
    token = self.peek_token()
    File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 128, in peek_token
    self.fetch_more_tokens()
    File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 220, in fetch_more_tokens
    return self.fetch_value()
    File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 576, in fetch_value
    self.get_mark())
    ScannerError: mapping values are not allowed here
    in "<unicode string>", line 4, column 12:
    description: example for a NSD.
    ^


    Thanks in advance.

    2017-10-31 11:54 GMT+01:00 Manas Mal <MMal@advaoptical.com<mailto:MMal@advaoptical.com>>:
    Hi David,

    You need to include the version :

    tosca_definitions_version tosca_simple_profile_for_nfv_1_0_0


    HTH
    Manas

    From: tosca-comment@lists.oasis-open.org<mailto:tosca-comment@lists.oasis-open.org> [mailto:tosca-comment@lists.oasis-open.org<mailto:tosca-comment@lists.oasis-open.org>] On Behalf Of David Gabriel
    Sent: 31 October 2017 16:05
    To: tosca-comment@lists.oasis-open.org<mailto:tosca-comment@lists.oasis-open.org>
    Subject: [tosca-comment] error when using tosca parser

    Dears,

    I have started using toscaparser and I got this error message:
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py<http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>", line 101, in __init__
    self.topology_template = self._topology_template()
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py<http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>", line 120, in _topology_template
    None)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py<http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>", line 61, in __init__
    self.groups = self._groups()
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py<http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>", line 163, in _groups
    self.custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py<http://disq.us/url?url=http%3A%2F%2Fgroups.py%3Aw39ewnjXnnqwMHqHdggvOnHYhag&cuid=4521329>", line 29, in __init__
    custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/entity_template.py<http://disq.us/url?url=http%3A%2F%2Fentity_template.py%3AY8gjryCOp0cPFritv9csZZksA04&cuid=4521329>", line 74, in __init__
    if type is not None else None
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/grouptype.py<http://disq.us/url?url=http%3A%2F%2Fgrouptype.py%3AipHWAamxbESI9sEAJ6WNzO3tQsY&cuid=4521329>", line 35, in __init__
    if self.DESCRIPTION in self.defs:
    TypeError: argument of type 'NoneType' is not iterable

    Kindly find attached my input file.
    I would appreciate any kind of help.
    Thanks in advance.
    best regards.





  • 5.  Re: [tosca-comment] error when using tosca parser

    Posted 10-31-2017 11:34
    Kindly find attached my yaml file that generates this error:

    tosca = ToscaTemplate(path, parsed_params, a_file)
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py",
    line 101, in __init__
    self.topology_template = self._topology_template()
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py",
    line 120, in _topology_template
    None)
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py",
    line 61, in __init__
    self.groups = self._groups()
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py",
    line 163, in _groups
    self.custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py", line
    29, in __init__
    custom_defs)
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/entity_template.py",
    line 74, in __init__
    if type is not None else None
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/grouptype.py",
    line 35, in __init__
    if self.DESCRIPTION in self.defs:
    TypeError: argument of type 'NoneType' is not iterable
    127.0.0.1 - - [31/Oct/2017 11:31:42] "POST /deploy_template HTTP/1.1" 500
    2641

    2017-10-31 12:21 GMT+01:00 Manas Mal <MMal@advaoptical.com>:

    >
    >
    > I assume you have given in this format:
    >
    >
    >
    > tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
    >
    >
    >
    >
    >
    > Also remove the “”import”” as you are not using this.
    >
    >
    >
    >
    >
    > Please attach your yaml file.
    >
    >
    >
    > Thanks,
    >
    > Manas
    >
    > *From:* David Gabriel [mailto:davidgab283@gmail.com]
    > *Sent:* 31 October 2017 16:42
    > *To:* Manas Mal <MMal@advaoptical.com>
    > *Cc:* tosca-comment@lists.oasis-open.org
    > *Subject:* Re: [tosca-comment] error when using tosca parser
    >
    >
    >
    > Thanks so much for your help.
    >
    > When I include the proposed line, I removed also the first one of my input
    > file.
    >
    > However, I got the below errors. Do you have any other remarks regarding
    > my input file ?
    >
    >
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py",
    > line 81, in __init__
    >
    > self.tpl = YAML_LOADER(self.path, self.a_file)
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/utils/yamlparser.py",
    > line 50, in load_yaml
    >
    > return yaml.load(f.read(), Loader=yaml_loader)
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/__init__.py", line
    > 71, in load
    >
    > return loader.get_single_data()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line
    > 37, in get_single_data
    >
    > node = self.get_single_node()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line
    > 36, in get_single_node
    >
    > document = self.compose_document()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line
    > 58, in compose_document
    >
    > self.get_event()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 118,
    > in get_event
    >
    > self.current_event = self.state()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 193,
    > in parse_document_end
    >
    > token = self.peek_token()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line
    > 128, in peek_token
    >
    > self.fetch_more_tokens()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line
    > 220, in fetch_more_tokens
    >
    > return self.fetch_value()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line
    > 576, in fetch_value
    >
    > self.get_mark())
    >
    > ScannerError: mapping values are not allowed here
    >
    > in "<unicode string>", line 4, column 12:
    >
    > description: example for a NSD.
    >
    > ^
    >
    >
    >
    >
    >
    > Thanks in advance.
    >
    >
    >
    > 2017-10-31 11:54 GMT+01:00 Manas Mal <MMal@advaoptical.com>:
    >
    > Hi David,
    >
    >
    >
    > You need to include the version :
    >
    >
    >
    > tosca_definitions_version tosca_simple_profile_for_nfv_1_0_0
    >
    >
    >
    >
    >
    > HTH
    >
    > Manas
    >
    >
    >
    > *From:* tosca-comment@lists.oasis-open.org [mailto:tosca-comment@lists.
    > oasis-open.org] *On Behalf Of *David Gabriel
    > *Sent:* 31 October 2017 16:05
    > *To:* tosca-comment@lists.oasis-open.org
    > *Subject:* [tosca-comment] error when using tosca parser
    >
    >
    >
    > Dears,
    >
    >
    >
    > I have started using toscaparser and I got this error message:
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>",
    > line 101, in __init__
    > self.topology_template = self._topology_template()
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>",
    > line 120, in _topology_template
    > None)
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/topo
    > logy_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>",
    > line 61, in __init__
    > self.groups = self._groups()
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/topo
    > logy_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>",
    > line 163, in _groups
    > self.custom_defs)
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py
    > <http://disq.us/url?url=http%3A%2F%2Fgroups.py%3Aw39ewnjXnnqwMHqHdggvOnHYhag&cuid=4521329>",
    > line 29, in __init__
    > custom_defs)
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/enti
    > ty_template.py
    > <http://disq.us/url?url=http%3A%2F%2Fentity_template.py%3AY8gjryCOp0cPFritv9csZZksA04&cuid=4521329>",
    > line 74, in __init__
    > if type is not None else None
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/
    > grouptype.py
    > <http://disq.us/url?url=http%3A%2F%2Fgrouptype.py%3AipHWAamxbESI9sEAJ6WNzO3tQsY&cuid=4521329>",
    > line 35, in __init__
    > if self.DESCRIPTION in self.defs:
    > TypeError: argument of type 'NoneType' is not iterable
    >
    >
    >
    > Kindly find attached my input file.
    >
    > I would appreciate any kind of help.
    > Thanks in advance.
    >
    > best regards.
    >
    >
    >
    >
    >



  • 6.  RE: [tosca-comment] error when using tosca parser

    Posted 10-31-2017 11:54
    Description :

    This is mandatory, so you need to provide the description.

    From: David Gabriel [mailto:davidgab283@gmail.com]
    Sent: 31 October 2017 17:04
    To: Manas Mal <MMal@advaoptical.com>
    Cc: tosca-comment@lists.oasis-open.org
    Subject: Re: [tosca-comment] error when using tosca parser

    Kindly find attached my yaml file that generates this error:

    tosca = ToscaTemplate(path, parsed_params, a_file)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py", line 101, in __init__
    self.topology_template = self._topology_template()
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py", line 120, in _topology_template
    None)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py", line 61, in __init__
    self.groups = self._groups()
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py", line 163, in _groups
    self.custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py", line 29, in __init__
    custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/entity_template.py", line 74, in __init__
    if type is not None else None
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/grouptype.py", line 35, in __init__
    if self.DESCRIPTION in self.defs:
    TypeError: argument of type 'NoneType' is not iterable
    127.0.0.1 - - [31/Oct/2017 11:31:42] "POST /deploy_template HTTP/1.1" 500 2641

    2017-10-31 12:21 GMT+01:00 Manas Mal <MMal@advaoptical.com<mailto:MMal@advaoptical.com>>:

    I assume you have given in this format:

    tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0


    Also remove the “”import”” as you are not using this.


    Please attach your yaml file.

    Thanks,
    Manas
    From: David Gabriel [mailto:davidgab283@gmail.com<mailto:davidgab283@gmail.com>]
    Sent: 31 October 2017 16:42
    To: Manas Mal <MMal@advaoptical.com<mailto:MMal@advaoptical.com>>
    Cc: tosca-comment@lists.oasis-open.org<mailto:tosca-comment@lists.oasis-open.org>
    Subject: Re: [tosca-comment] error when using tosca parser

    Thanks so much for your help.
    When I include the proposed line, I removed also the first one of my input file.
    However, I got the below errors. Do you have any other remarks regarding my input file ?

    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py", line 81, in __init__
    self.tpl = YAML_LOADER(self.path, self.a_file)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/utils/yamlparser.py", line 50, in load_yaml
    return yaml.load(f.read(), Loader=yaml_loader)
    File "/usr/local/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load
    return loader.get_single_data()
    File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
    node = self.get_single_node()
    File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
    File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 58, in compose_document
    self.get_event()
    File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 118, in get_event
    self.current_event = self.state()
    File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 193, in parse_document_end
    token = self.peek_token()
    File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 128, in peek_token
    self.fetch_more_tokens()
    File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 220, in fetch_more_tokens
    return self.fetch_value()
    File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 576, in fetch_value
    self.get_mark())
    ScannerError: mapping values are not allowed here
    in "<unicode string>", line 4, column 12:
    description: example for a NSD.
    ^


    Thanks in advance.

    2017-10-31 11:54 GMT+01:00 Manas Mal <MMal@advaoptical.com<mailto:MMal@advaoptical.com>>:
    Hi David,

    You need to include the version :

    tosca_definitions_version tosca_simple_profile_for_nfv_1_0_0


    HTH
    Manas

    From: tosca-comment@lists.oasis-open.org<mailto:tosca-comment@lists.oasis-open.org> [mailto:tosca-comment@lists.oasis-open.org<mailto:tosca-comment@lists.oasis-open.org>] On Behalf Of David Gabriel
    Sent: 31 October 2017 16:05
    To: tosca-comment@lists.oasis-open.org<mailto:tosca-comment@lists.oasis-open.org>
    Subject: [tosca-comment] error when using tosca parser

    Dears,

    I have started using toscaparser and I got this error message:
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py<http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>", line 101, in __init__
    self.topology_template = self._topology_template()
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py<http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>", line 120, in _topology_template
    None)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py<http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>", line 61, in __init__
    self.groups = self._groups()
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py<http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>", line 163, in _groups
    self.custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py<http://disq.us/url?url=http%3A%2F%2Fgroups.py%3Aw39ewnjXnnqwMHqHdggvOnHYhag&cuid=4521329>", line 29, in __init__
    custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/entity_template.py<http://disq.us/url?url=http%3A%2F%2Fentity_template.py%3AY8gjryCOp0cPFritv9csZZksA04&cuid=4521329>", line 74, in __init__
    if type is not None else None
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/grouptype.py<http://disq.us/url?url=http%3A%2F%2Fgrouptype.py%3AipHWAamxbESI9sEAJ6WNzO3tQsY&cuid=4521329>", line 35, in __init__
    if self.DESCRIPTION in self.defs:
    TypeError: argument of type 'NoneType' is not iterable

    Kindly find attached my input file.
    I would appreciate any kind of help.
    Thanks in advance.
    best regards.






  • 7.  Re: [tosca-comment] error when using tosca parser

    Posted 10-31-2017 12:39
    Thank you for your support ...
    I added description as shown in the attached file, but I got this error
    message:

    tosca = ToscaTemplate(path, parsed_params, a_file)
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py",
    line 101, in __init__
    self.topology_template = self._topology_template()
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py",
    line 120, in _topology_template
    None)
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py",
    line 61, in __init__
    self.groups = self._groups()
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py",
    line 163, in _groups
    self.custom_defs)
    File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py", line
    29, in __init__
    custom_defs)
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/entity_template.py",
    line 74, in __init__
    if type is not None else None
    File
    "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/grouptype.py",
    line 35, in __init__
    if self.DESCRIPTION in self.defs:
    TypeError: argument of type 'NoneType' is not iterable
    127.0.0.1 - - [31/Oct/2017 12:33:35] "POST /deploy_template HTTP/1.1" 500
    2641


    For more information, the input parameters for the following source code
    line are:
    tosca = ToscaTemplate(path, parsed_params, a_file)
    #path= the path to the yaml file
    #parsed_params={}
    #a_file=True

    Any advice is appriciated.
    thanks in advance.

    2017-10-31 12:54 GMT+01:00 Manas Mal <MMal@advaoptical.com>:

    > Description :
    >
    >
    >
    > This is mandatory, so you need to provide the description.
    >
    >
    >
    > *From:* David Gabriel [mailto:davidgab283@gmail.com]
    > *Sent:* 31 October 2017 17:04
    >
    > *To:* Manas Mal <MMal@advaoptical.com>
    > *Cc:* tosca-comment@lists.oasis-open.org
    > *Subject:* Re: [tosca-comment] error when using tosca parser
    >
    >
    >
    > Kindly find attached my yaml file that generates this error:
    >
    >
    >
    > tosca = ToscaTemplate(path, parsed_params, a_file)
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py",
    > line 101, in __init__
    >
    > self.topology_template = self._topology_template()
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py",
    > line 120, in _topology_template
    >
    > None)
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py",
    > line 61, in __init__
    >
    > self.groups = self._groups()
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/topology_template.py",
    > line 163, in _groups
    >
    > self.custom_defs)
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py",
    > line 29, in __init__
    >
    > custom_defs)
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/entity_template.py",
    > line 74, in __init__
    >
    > if type is not None else None
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/grouptype.py",
    > line 35, in __init__
    >
    > if self.DESCRIPTION in self.defs:
    >
    > TypeError: argument of type 'NoneType' is not iterable
    >
    > 127.0.0.1 - - [31/Oct/2017 11:31:42] "POST /deploy_template HTTP/1.1" 500
    > 2641
    >
    >
    >
    > 2017-10-31 12:21 GMT+01:00 Manas Mal <MMal@advaoptical.com>:
    >
    >
    >
    > I assume you have given in this format:
    >
    >
    >
    > tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
    >
    >
    >
    >
    >
    > Also remove the “”import”” as you are not using this.
    >
    >
    >
    >
    >
    > Please attach your yaml file.
    >
    >
    >
    > Thanks,
    >
    > Manas
    >
    > *From:* David Gabriel [mailto:davidgab283@gmail.com]
    > *Sent:* 31 October 2017 16:42
    > *To:* Manas Mal <MMal@advaoptical.com>
    > *Cc:* tosca-comment@lists.oasis-open.org
    > *Subject:* Re: [tosca-comment] error when using tosca parser
    >
    >
    >
    > Thanks so much for your help.
    >
    > When I include the proposed line, I removed also the first one of my input
    > file.
    >
    > However, I got the below errors. Do you have any other remarks regarding
    > my input file ?
    >
    >
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py",
    > line 81, in __init__
    >
    > self.tpl = YAML_LOADER(self.path, self.a_file)
    >
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/utils/yamlparser.py",
    > line 50, in load_yaml
    >
    > return yaml.load(f.read(), Loader=yaml_loader)
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/__init__.py", line
    > 71, in load
    >
    > return loader.get_single_data()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line
    > 37, in get_single_data
    >
    > node = self.get_single_node()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line
    > 36, in get_single_node
    >
    > document = self.compose_document()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line
    > 58, in compose_document
    >
    > self.get_event()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 118,
    > in get_event
    >
    > self.current_event = self.state()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 193,
    > in parse_document_end
    >
    > token = self.peek_token()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line
    > 128, in peek_token
    >
    > self.fetch_more_tokens()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line
    > 220, in fetch_more_tokens
    >
    > return self.fetch_value()
    >
    > File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line
    > 576, in fetch_value
    >
    > self.get_mark())
    >
    > ScannerError: mapping values are not allowed here
    >
    > in "<unicode string>", line 4, column 12:
    >
    > description: example for a NSD.
    >
    > ^
    >
    >
    >
    >
    >
    > Thanks in advance.
    >
    >
    >
    > 2017-10-31 11:54 GMT+01:00 Manas Mal <MMal@advaoptical.com>:
    >
    > Hi David,
    >
    >
    >
    > You need to include the version :
    >
    >
    >
    > tosca_definitions_version tosca_simple_profile_for_nfv_1_0_0
    >
    >
    >
    >
    >
    > HTH
    >
    > Manas
    >
    >
    >
    > *From:* tosca-comment@lists.oasis-open.org [mailto:tosca-comment@lists.
    > oasis-open.org] *On Behalf Of *David Gabriel
    > *Sent:* 31 October 2017 16:05
    > *To:* tosca-comment@lists.oasis-open.org
    > *Subject:* [tosca-comment] error when using tosca parser
    >
    >
    >
    > Dears,
    >
    >
    >
    > I have started using toscaparser and I got this error message:
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>",
    > line 101, in __init__
    > self.topology_template = self._topology_template()
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/tosca_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftosca_template.py%3AiEsjm6IxAnZrGJcztMfZtxG1qCg&cuid=4521329>",
    > line 120, in _topology_template
    > None)
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/topo
    > logy_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>",
    > line 61, in __init__
    > self.groups = self._groups()
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/topo
    > logy_template.py
    > <http://disq.us/url?url=http%3A%2F%2Ftopology_template.py%3A4aFR1O6hTNppMN3Up2V9mkjohds&cuid=4521329>",
    > line 163, in _groups
    > self.custom_defs)
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/groups.py
    > <http://disq.us/url?url=http%3A%2F%2Fgroups.py%3Aw39ewnjXnnqwMHqHdggvOnHYhag&cuid=4521329>",
    > line 29, in __init__
    > custom_defs)
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/enti
    > ty_template.py
    > <http://disq.us/url?url=http%3A%2F%2Fentity_template.py%3AY8gjryCOp0cPFritv9csZZksA04&cuid=4521329>",
    > line 74, in __init__
    > if type is not None else None
    > File "/usr/local/lib/python2.7/dist-packages/toscaparser/elements/
    > grouptype.py
    > <http://disq.us/url?url=http%3A%2F%2Fgrouptype.py%3AipHWAamxbESI9sEAJ6WNzO3tQsY&cuid=4521329>",
    > line 35, in __init__
    > if self.DESCRIPTION in self.defs:
    > TypeError: argument of type 'NoneType' is not iterable
    >
    >
    >
    > Kindly find attached my input file.
    >
    > I would appreciate any kind of help.
    > Thanks in advance.
    >
    > best regards.
    >
    >
    >
    >
    >
    >
    >