rinohtype icon indicating copy to clipboard operation
rinohtype copied to clipboard

AttributeError: type object 'Container' has no attribute 'node_location'

Open astrojuanlu opened this issue 4 years ago • 1 comments

Hi! I'm Juan Luis, I work as Developer Advocate at Read the Docs. I have been following your project for some time, and today I decided to try to use it in one of my personal open source libraries. Thanks a lot for all the work you do!

When I first tried generating the documentation of https://github.com/poliastro/poliastro/, I got this error:

NotImplementedError: None:None the 'CodeAreaNode' node is not yet supported (rinoh.frontend.rst.nodes)

Then I installed the master version, and got this other error instead:

Exception occurred:
  File "/home/juanlu/Projects/LSF/poliastro/library/.venv38/lib/python3.8/site-packages/rinoh/frontend/__init__.py", line 29, in map_node
    filename, line, node_name = cls.node_location(node)
AttributeError: type object 'Container' has no attribute 'node_location'

I acknowledge that poliastro is a rather complex project, but I'll be happy to help with debugging if at least we can get it closer to fully working. I still didn't have time to try to narrow down the issue, but I can try it if you think it will be useful.

  • rinohtype version: rinoh 0.5.3 (in development) (installed from 88f727182)
  • Sphinx version: sphinx-build 3.4.3
  • Python version: Python 3.8.5
  • operating system: latest Linux Mint

astrojuanlu avatar Jun 11 '21 10:06 astrojuanlu

Hi Juan Luis. Thanks for taking the time to report these issues.

I see your project's documentation has some maths in it. You should know that rinohtype doesn't support math typesetting at this moment.

As for the other issues:

  1. CodeAreaNode is a custom node introduced by the nbsphinx extension. Possibly, that extension could implement support for that node in a more generic way so that rinohtype is automatically supported. This is often the case with extensions because the Sphinx docs point the reader in the direction of writing builder-specific code.
  2. AttributeError: type object 'Container' has no attribute 'node_location': This is a regression in rinohtype.

brechtm avatar Jun 11 '21 13:06 brechtm