executablebooks / sphinx-tabs

Tabbed views for Sphinx
https://sphinx-tabs.readthedocs.io
MIT License
264 stars 68 forks source link

Extension load error #149

Closed ronstone2000 closed 2 years ago

ronstone2000 commented 2 years ago

Describe the bug

context When I try to run sphinx via tox, this extension causes the job to error.

expectation I expected the extension to load.

bug requirements.txt: sphinx-tabs

conf.py: extensions = ['sphinx_tabs.tabs']

console:

Exception occurred:
  File ".tox/wra-docs/lib/python3.6/site-packages/sphinx_tabs/tabs.py", line 341, in setup
    app.add_javascript(path)
AttributeError: 'Sphinx' object has no attribute 'add_javascript'

Reproduce the bug

With the tox requirement and conf.py extension set up show, run a tox job that calls sphinx-build against a conf.py that loads the sphinx-tabs extension.

List your environment

Sphinx 4.2.0 tox 3.13.3 Ubuntu: 20.04.2

welcome[bot] commented 2 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

foster999 commented 2 years ago

Our code uses add_js_file, which is part of the current sphinx API. I suspect you have an old version of sphinx-tabs installed?