#184 TAP parsing crash: ParserError: expected '<document start>', but found '<block mapping start>'
Closed: Fixed None Opened 10 years ago by kparal.

There is a crash here:
http://taskotron-dev.fedoraproject.org/taskmaster/builders/x86_64/builds/5681/steps/runtask/logs/stdio

I can reproduce it locally:

$ runtask -i R-caTools-1.17-3.fc22 -t koji_build -a x86_64 -j x86_64/5681 ../task-rpmlint/rpmlint.yml --debug
[libtaskotron:runner.py:228] 2014-08-18 09:57:27 DEBUG   Parsed arguments: Namespace(arch=['x86_64'], debug=True, item='R-caTools-1.17-3.fc22', jobid='x86_64/5681', override=[], task=['../task-rpmlint/rpmlint.yml'], type='koji_build')
[libtaskotron:config.py:93] 2014-08-18 09:57:27 DEBUG   Using config file: /etc/taskotron/taskotron.yaml
[libtaskotron:config.py:64] 2014-08-18 09:57:27 DEBUG   Using config profile: development
[libtaskotron:logger.py:163] 2014-08-18 09:57:27 DEBUG   Stream logging enabled with level: DEBUG
[libtaskotron:runner.py:41] 2014-08-18 09:57:27 DEBUG   Current workdir: /var/tmp/taskotron/task-afN1QL
[libtaskotron:runner.py:103] 2014-08-18 09:57:27 DEBUG   Executing directive: koji
[libtaskotron:koji_directive.py:133] 2014-08-18 09:57:27 INFO    Getting RPMs for koji build R-caTools-1.17-3.fc22 (['x86_64', 'noarch']) and downloading to /var/tmp/taskotron/task-afN1QL
[libtaskotron:koji_utils.py:116] 2014-08-18 09:57:27 INFO    Querying Koji for a list of RPMS for: R-caTools-1.17-3.fc22
[libtaskotron:koji_utils.py:166] 2014-08-18 09:57:29 INFO    Fetching 1 RPMs for: R-caTools-1.17-3.fc22
[libtaskotron:file_utils.py:106] 2014-08-18 09:57:29 DEBUG   Downloading: http://kojipkgs.fedoraproject.org/packages/R-caTools/1.17/3.fc22/x86_64/R-caTools-1.17-3.fc22.x86_64.rpm
R-caTools-1.17-3.fc22.x86_64.rpm                                                                                                                                                            | 188 kB  00:00:00     
[libtaskotron:runner.py:103] 2014-08-18 09:57:30 DEBUG   Executing directive: python
[libtaskotron:python_directive.py:154] 2014-08-18 09:57:30 INFO    Executing Python: run_rpmlint.run() with args {'workdir': '/var/tmp/taskotron/task-afN1QL'}
[libtaskotron:runner.py:117] 2014-08-18 09:57:31 DEBUG   Variable ${rpmlint_output} was exported with value:
TAP version 13
1..1
ok - $CHECKNAME for Koji build R-caTools-1.17-3.fc22.x86_64.rpm
  ---
  details:
    output: |
      R-caTools.x86_64: W: spelling-error Summary(en_US) gif -> fig, gig, if
      R-caTools.x86_64: W: spelling-error Summary(en_US) roc -> cor, rock, Kroc
      R-caTools.x86_64: W: spelling-error Summary(en_US) auc -> aux, ac, arc
      R-caTools.x86_64: W: summary-ended-with-dot C Tools: moving window statistics, gif, base64, roc auc...
      R-caTools.x86_64: W: spelling-error %description -l en_US cumsum -> cum sum, cum-sum, cums um
      1 packages and 0 specfiles checked; 0 errors, 5 warnings.
  item: R-caTools-1.17-3.fc22.x86_64.rpm
  outcome: PASSED
  summary: RPMLINT PASSED for R-caTools-1.17-3.fc22.x86_64.rpm
  type: koji_build
  ...
[libtaskotron:runner.py:103] 2014-08-18 09:57:31 DEBUG   Executing directive: resultsdb
[libtaskotron:logger.py:70] 2014-08-18 09:57:31 CRITICAL Traceback (most recent call last):
  File "/home/kparal/devel/taskotron/env_taskotron/bin/runtask", line 9, in <module>
    load_entry_point('libtaskotron==0.3.2', 'console_scripts', 'runtask')()
  File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/runner.py", line 244, in main
    task_runner.run()
  File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/runner.py", line 50, in run
    self.do_actions()
  File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/runner.py", line 134, in do_actions
    self.do_single_action(action)
  File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/runner.py", line 112, in do_single_action
    self.envdata)
  File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/directives/resultsdb_directive.py", line 161, in process
    check_details = check.import_TAP(input_data['results'])
  File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/check.py", line 345, in import_TAP
    tap.parse(source)
  File "/home/kparal/devel/taskotron/env_taskotron/lib/python2.7/site-packages/pytap13.py", line 139, in parse
    self._parse(StringIO.StringIO(source))
  File "/home/kparal/devel/taskotron/env_taskotron/lib/python2.7/site-packages/pytap13.py", line 70, in _parse
    self.tests[-1].yaml = yamlish.load(self.tests[-1]._yaml_buffer)
  File "/home/kparal/devel/taskotron/env_taskotron/lib/python2.7/site-packages/yamlish.py", line 187, in load
    out = load(inobj)
  File "/home/kparal/devel/taskotron/env_taskotron/lib/python2.7/site-packages/yamlish.py", line 181, in load
    out = yaml.load(source, Loader=_YamlishLoader)
  File "/home/kparal/devel/taskotron/env_taskotron/lib/python2.7/site-packages/yaml/__init__.py", line 71, in load
    return loader.get_single_data()
  File "/home/kparal/devel/taskotron/env_taskotron/lib/python2.7/site-packages/yaml/constructor.py", line 37, in get_single_data
    node = self.get_single_node()
  File "/home/kparal/devel/taskotron/env_taskotron/lib/python2.7/site-packages/yaml/composer.py", line 39, in get_single_node
    if not self.check_event(StreamEndEvent):
  File "/home/kparal/devel/taskotron/env_taskotron/lib/python2.7/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/home/kparal/devel/taskotron/env_taskotron/lib/python2.7/site-packages/yaml/parser.py", line 174, in parse_document_start
    self.peek_token().start_mark)
ParserError: expected '<document start>', but found '<block mapping start>'
  in "<unicode string>", line 7, column 1:
    R-caTools.x86_64: W: summary-end ... 
    ^

Please find out what's wrong.


This ticket had assigned some Differential requests:
D209
D211

Dots at the end of this line are causing this problem:
R-caTools.x86_64: W: summary-ended-with-dot C Tools: moving window statistics, gif, base64, roc auc...
Fix is easy (see D209), but we have to wait for @jskladan until he pushes the changes into PyPI.

Changes are in PyPI, thanks @jskladan.

Now we need to bump requirements.txt and libtaskotron.spec and ask @tflink to build and deploy a new version (it might be worth waiting for #293 with that).

Log in to comment on this ticket.

Metadata