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

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

Open
astrojuanlu opened this issue Jun 11, 2021 · 1 comment
Labels
bug crash rinohtype aborts due to an uncaught exception

Comments

@astrojuanlu
Copy link

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 88f7271)
  • Sphinx version: sphinx-build 3.4.3
  • Python version: Python 3.8.5
  • operating system: latest Linux Mint
@astrojuanlu astrojuanlu added bug crash rinohtype aborts due to an uncaught exception labels Jun 11, 2021
@brechtm
Copy link
Owner

brechtm commented Jun 11, 2021

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 brechtm changed the title Cannot generate PDF documentation AttributeError: type object 'Container' has no attribute 'node_location' Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crash rinohtype aborts due to an uncaught exception
Projects
None yet
Development

No branches or pull requests

2 participants