Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

needpie with zero needs causes matplotlib crash of build #513

Closed
r-o-b-e-r-t-o opened this issue Mar 9, 2022 · 1 comment
Closed

needpie with zero needs causes matplotlib crash of build #513

r-o-b-e-r-t-o opened this issue Mar 9, 2022 · 1 comment
Assignees
Labels

Comments

@r-o-b-e-r-t-o
Copy link
Contributor

I think there is a bug that causes the build to crash if there is a needpie filter condition does not return any needs.

I'm using version sphinxcontib.needs version 0.7.7.

Error:

/usr/local/lib/python3.8/dist-packages/matplotlib/axes/_axes.py:3052: RuntimeWarning: invalid value encountered in true_divide
  x = x / sx
Needs successfully exported

Extension error (sphinxcontrib.needs.directives.needpie):
Handler <function process_needpie at 0x7f398809aaf0> for event 'doctree-resolved' threw an exception (exception: cannot convert float NaN to integer)

RST source:

.. needpie::
   :labels: draft, submitted, assumed, agreed, obsolete, rejected
   :legend:

   type == 'cuc' and status == 'draft'
   type == 'cuc' and status == 'submitted'
   type == 'cuc' and status == 'assumed'
   type == 'cuc' and status == 'agreed'
   type == 'cuc' and status == 'obsolete'
   type == 'cuc' and status == 'rejected'

Error disappears when I add a cuc need:

.. cuc:: test
   :id: CUC_0815
   :status: draft

.. needpie::
   :labels: draft, submitted, assumed, agreed, obsolete, rejected
   :legend:

   type == 'cuc' and status == 'draft'
   type == 'cuc' and status == 'submitted'
   type == 'cuc' and status == 'assumed'
   type == 'cuc' and status == 'agreed'
   type == 'cuc' and status == 'obsolete'
   type == 'cuc' and status == 'rejected'
@r-o-b-e-r-t-o r-o-b-e-r-t-o changed the title needpie with zero needs causes matlab crash of build needpie with zero needs causes matplotlib crash of build Mar 9, 2022
@danwos danwos added the bug label Mar 9, 2022
@danwos danwos self-assigned this Mar 9, 2022
aris-bb added a commit to aris-bb/sphinxcontrib-needs that referenced this issue Mar 25, 2022
danwos pushed a commit that referenced this issue Mar 27, 2022
@danwos
Copy link
Member

danwos commented Mar 27, 2022

Fixed by #519

@danwos danwos closed this as completed Mar 27, 2022
danwos pushed a commit that referenced this issue Mar 31, 2022
* fix for #513 #517

* fix for failing CI

* fix linting

* Bugfix: needextract not correctly rendering nested needs

Fixes #329
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants