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

csv-table directive fails inside needs directive

Open twodrops opened this issue 4 years ago • 1 comments

When .. csv-table:: is used inside .. need:: it fails with the following error

WARNING: Problems with "csv-table" directive path:
[Errno 2] Datei oder Verzeichnis nicht gefunden: 'import/test_table.csv'.

The tried paths relative to conf.py and also relative to the source rst. Outside the need the same directive works without changing anything.

As a side note: Issue was present even before the fix https://github.com/useblocks/sphinxcontrib-needs/issues/351 and is not related to it.

Prio: Low

twodrops avatar Oct 06 '21 03:10 twodrops

Mhh interesting. I guess the csv-table internal way to get the current document path is not working, if part of a need. The reason may be, that the need content gets not rendered by Sphinx directly, but Sphinx-Needs invokes the rst-rendering on its own. And I bet Sphinx-Needs does not set certain attributes somewhere, so that the csv-table directive is happy.

I have to check the csv-table code to understand how complex a solution may be.

danwos avatar Oct 21 '21 15:10 danwos