Re: [tosca-comment] error when using tosca parser

From
David Gabriel <>
Date
2017-10-31T11:11:33+00:00
ID
CAMyzk1eKgtncaKtxdqi2yWjAnwRFVXFos5vg=
Thread
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 <>:

Hi David,

 

You need to include the version :

 

tosca_definitions_version   tosca_simple_profile_for_nfv_1_0_0

 

 

HTH

Manas

 

From:  [mailto:]
On Behalf Of David Gabriel

Sent: 31 October 2017 16:05

To: 

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",
 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

 

Kindly find attached my input file.

I would appreciate any kind of help.

Thanks in advance.

best regards.