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

Plotly graphs not rendering #1

Closed
StefanTodoran opened this issue Nov 4, 2022 · 3 comments
Closed

Plotly graphs not rendering #1

StefanTodoran opened this issue Nov 4, 2022 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@StefanTodoran
Copy link
Contributor

Plotly graphs do not show up on the github pages site. Here is how a rendered graph from 2.3_pandas_rendered.ipynb looks in visual studio code:

image

And here is how it looks on the website. Note that if you use inspect element to inspect the section in question, you will notice that the "cell_output docutils container" that should have the graph is completely empty.

image
There are a number of possible reasons, the following are ones that I have tried and have not remedied the problem:

  • According to https://jupyterbook.org/en/stable/interactive/interactive.html, Including plotly plots in a Jupyter Book page is currently not compatible with the dollarmath syntax extension (mathematical notation written between two “$” characters). However the current version of 2.3_pandas_rendered.ipynb does not include any dollarmath and the graph still does not render.
  • It is necessary to load require.js in _config.yml, this has been done and is not the issue.
  • It is configured it _config.yml for notebooks with "rendered" in the name to not be re-executed, (see exclude_patterns: ["rendered", "skip"] in _config.yml) however this did not fix the issue either.
  • There may be other fixes I tried but these are all that I remember.

I have not yet reproduced this is another jupyter notebook, that is the next step at the moment.

@StefanTodoran
Copy link
Contributor Author

Update:
So I tried downloading the .ipynb from here and putting it in the geosmart use case book and was able to reproduce the same effect. Therefore it seems likely that the issue exists in the GeoSMART hackweek jupyter book template from which both this book and the use case book where made.

@StefanTodoran
Copy link
Contributor Author

I have located the issue. The environment in which the build workflow runs in during the github action doesn't have pandas, so execution of the notebook in question fails.

This is odd, since the environment.yml file does include pandas. This means the setupconda action is failing. This likely has something to do with the fact that it uses the lock files, which are a relic from the hackweek template and are unused/updated.

Either the setupconda action needs to be change so as to build directly from environment.yml or the lock files need to be updated somehow.

@StefanTodoran StefanTodoran added bug Something isn't working help wanted Extra attention is needed labels Feb 8, 2023
@mdenolle
Copy link
Contributor

No longer needed - we are choosing a minimalist approach with limited dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants