udapi.block.util.findbug module

Block util.FindBug for debugging.

Usage: If block xy.Z fails with a Python exception, insert “util.FindBug block=” into the scenario, e.g. to debug second.Block, use

udapy first.Block util.FindBug block=second.Block > bug.conllu

This will create the file bug.conllu with the bundle, which caused the bug.

The second.Block can have any parameters, e.g.

udapy first.Block util.FindBug block=second.Block param1=value1 param2=value2 > bug.conllu

class udapi.block.util.findbug.FindBug(block, first_error_only=True, files='-', filehandle=None, docname_as_file=False, encoding='utf-8', newline='\n', overwrite=False, **kwargs)[source]

Bases: BaseWriter

Debug another block by finding a minimal testcase conllu file.

process_document(document)[source]

Process a UD document