os-api-ref: yaml error in parameters.yaml does not report properly

Bug #1832240 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstackdocstheme
New
Undecided
Unassigned

Bug Description

Using os-api-ref: 1.6.1

If there is an error in the YAML in parameters.yaml the error handling to report that error doesn't work, instead:

Exception occurred:
  File "/Users/cdent/src/placement/.tox/docs/lib/python3.7/site-packages/os_api_ref/__init__.py", line 236, in _load_param_file
    LOG.exception(exc_info=exc)
TypeError: exception() missing 1 required positional argument: 'msg'

which corresponds with: https://opendev.org/openstack/os-api-ref/src/commit/f8557cb63dc2c8a9b8f56b25318e9b600da00c75/os_api_ref/__init__.py#L232

The real error in this case was:

while parsing a block mapping
  in "/Users/cdent/src/placement/api-ref/source/parameters.yaml", line 2, column 1
expected <block end>, but found '<block mapping start>'
  in "/Users/cdent/src/placement/api-ref/source/parameters.yaml", line 477, column 3

which I was able to fix once I knew what it was.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.