thclark / sphinx-charts

Interactive charts in sphinx HTML docs, using plot.ly and D3
MIT License
26 stars 3 forks source link

Version 0.0.4 not compatible with latest version of Sphinx (4.3.2) #10

Closed TooDissing closed 2 years ago

TooDissing commented 2 years ago

Hey, trying to upgrade to the latest version of Sphinx - version 4.3.2 - but this module doesn't seem to be compatible. Any plans on addressing this, or any clues on how to fix this?

When running pip3 install -U Sphinx, I'm getting the below error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
sphinx-charts 0.0.4 requires sphinx<4,>=2, but you have sphinx 4.3.2 which is incompatible.

And when trying to build the site anyway, then this error happens:

  File "/usr/local/lib/python3.9/site-packages/sphinx_charts/charts.py", line 242, in setup
    app.add_javascript(path)
AttributeError: 'Sphinx' object has no attribute 'add_javascript'
The full traceback has been saved in /var/folders/p8/h425k82s2r3cy03hyqyhst7w0000gp/T/sphinx-err-sxpazmrg.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Command exited with exit code: 2
The server will continue serving the build folder, but the contents being served are no longer in sync with the documentation sources. Please fix the cause of the error above or press Ctrl+C to stop the server.
thclark commented 2 years ago

Sphinx must have altered the way in which javascript modules get added to the page.

I'm busy right now, although will likely get around to this over the next 6-12 months becasue I still do use this module actively in several projects.

However, if you're needing a faster fix please do check out a branch and make a fix... if you make a PR that passes tests I'll do the admin of versioning and release.

TooDissing commented 2 years ago

Yes. That seems so. I'll try to find a migration guide somewhere and get it a go.

thclark commented 2 years ago

All done in 0.1.0, with a major update to the stack and devops too. Thanks for your help @LydByDissing