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

'Section' has no attribute 'node_location' when using mermaid directive #290

Closed
markhoneth opened this issue Sep 2, 2021 · 1 comment
Closed
Labels
crash rinohtype aborts due to an uncaught exception third party

Comments

@markhoneth
Copy link

I'm not familiar with the inner workings of Sphinx and rinohtype so I'd really appreciate some help with this.
HTML output works fine, but I'm getting the following exception when I try to build the PDF with rinohtype:

  1.  ...
     Traceback (most recent call last):
          File "c:\programdata\anaconda3\envs\docs\lib\site-packages\rinoh\frontend\__init__.py", line 27, in map_node
             return cls._mapping[node_name.replace('-', '_')](node, **context)
     KeyError: 'mermaid'
     
     During handling of the above exception, another exception occurred:
     
     ...
     Traceback (most recent call last):
       File "c:\programdata\anaconda3\envs\docs\lib\site-packages\rinoh\frontend\__init__.py", line 29, in map_node 
           filename, line, node_name = cls.node_location(node)
     AttributeError: type object 'Section' has no attribute 'node_location'
    

    See the attachment for the full trace.

  2. I have a simple mermaid directive in my content:
    .. mermaid:: data/gantt_chart.mmd
    If I remove the directive, the PDF is generated without issues.

    My conf.py is using the mermaid extension (without the CLI):

    extensions = [
                 #...                        
                 'sphinxcontrib.mermaid',
                ]
    

System Info

  • rinohtype version: 0.5.3
  • Sphinx version: 4.0.2
  • Python version: 3.9.5
  • Windows version: 10.0.19043
@markhoneth markhoneth added bug crash rinohtype aborts due to an uncaught exception labels Sep 2, 2021
@brechtm brechtm added third party and removed bug labels Oct 1, 2021
@brechtm
Copy link
Owner

brechtm commented Oct 1, 2021

sphinxcontrib-mermaid would need to add support for the rinoh builder for this to work. This extension could possibly be made independent of specific builders by using an approach described in the comments to #201.

Closing as this isn't a bug in rinohtype. Discussion is still allowed, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash rinohtype aborts due to an uncaught exception third party
Projects
None yet
Development

No branches or pull requests

2 participants