sphinx-needs icon indicating copy to clipboard operation
sphinx-needs copied to clipboard

needtable exception with style_row and copy

Open ubmarco opened this issue 4 years ago • 0 comments

The following RST leads to below exception

.. needtable::
   :filter: type == 'story'
   :columns: id, title, status, author, incoming
   :style_row: needs_[[copy("status")]]

.. story:: With status
   :id: US_status
   :status: open

.. story:: Without status
   :id: US_wo_status

image The source of the problem is that :style_row: wants to use a status that does not exist for need US_wo_status. This certainly looks like an input data problem, but the error message is not helpful. Can the message be more specific to the need and field?

Here is the message for copy/pasting:

Extension error (sphinxcontrib.needs.directives.needtable):
Handler <function process_needtables at 0x7f990a7240d0> for event 'doctree-resolved' threw an exception (exception: replace() argument 2 must be str, not None)

ubmarco avatar Oct 28 '21 10:10 ubmarco