-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Trouble saving images during build #4661
Comments
If I switch to using matplotlib's imagemagickwriter to save the gif. Then the build fails completely: https://readthedocs.org/projects/animatplot/builds/7828320/ with:
|
What are the requirements to use this feature? Maybe there is something that needs to be installed? |
I'll take a look on Monday |
The features are still under development I'm installing a dev version of sphinx-gallery by listing the git branch in the requirements file. As far as I can tell, it is installed properly it does run my example code and produces an image which it then adds to the auto-generated documents. (Ultimately, it uses matplotlib and Pillow to save the image to disk). The problem is that the gif isn't produced properly on RTD, yet local builds and circleci work fine. |
I'm not familiar with the libs you are using, neither the process that they follow to generate the images, so I can't tell if this is a rtd problem. What commands are you using to build the docs locally? |
Ok, I have investigated this a little more, I found this happens when building with the rtd-sphinx-extension. Maybe the lib is relying on the builder to always be You can test this locally with:
Adding to your cong.py file this
And building your docs with
|
Nevermind about the above comment, I don't think the extension is the problem (looks like I just needed to refresh the page to trigger the gif). I'm thinkgin something related to the libs installed locally. Maybe the pandoc version? |
Our latest image is using |
Ok, I was able to build the docs correctly inside the docker container, still not sure what is happening inside the rtd code. But something must be failing silently. |
Just adding that the generated git is half the size from the one generated outside rtd. Maybe a permissions issue? |
So, I finally was able to replicate this inside the container, if I do all the steps using a virtualenv, the generated gif is static (one frame, half the original size, etc). If I do all the steps using the global python interpreter, then the gif is generated correctly. I'm not really sure why is this happening. Locally, I was able to generate the correct gif using a virtualenv. |
Hello! I'm one of the devs working with Sphinx Gallery. Could it be a difference in dependency versions? I think that there are some other ways to create gifs using matplotlib (with imagemagick I believe) so maybe that'll get it working |
@stsewd Thank you for taking the time to replicate the issue. How could I install imagemagick for use on RTD? I did make one attempt to use imagemagick, but the build failed completely on RTD. (Imagemagick is also less good for my workflow). |
We have an open issue about adding imagemagick to the rtd docker images readthedocs/readthedocs-docker-images#70 |
I presume that would require me to use the latest docker image (once it's added), but I was having trouble building on the latest docker image. #4446 Though I think that I may know away around it. I'll try to test that later. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. Thanks! |
If readthedocs/readthedocs-docker-images#70 works to solve this issus, we can keep this closed, if there is something else we should do let us know, so we can re-open. |
Details
Sphinx-gallery is trying to add support for images that are saved to disk when an example is run:sphinx-gallery/sphinx-gallery#417 (comment)
I am trying to get a prototype of this to work over at: t-makaro/animatplot#14
My docs build works perfectly locally or on cirleci, but for some reason when run on RTD the image files do not seem to be produced properly. (This would be much easier to debug if I could download the built source off RTD). The images are being saved to disk using matplotlib's PillowWriter, but for some reason on RTD only the first frame is saved.
Expected Result
Two images are produced, and there are both animated. See:
https://145-87026896-gh.circle-artifacts.com/0/home/circleci/project/docs/build/html/auto_examples/plot_sqwell.html
Actual Result
Two images are produced, but they are static.
https://animatplot.readthedocs.io/en/latest/auto_examples/plot_sqwell.html#sphx-glr-auto-examples-plot-sqwell-py
The text was updated successfully, but these errors were encountered: