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

Google Colab: Video data is no longer automatically embedded in the notebook #3741

Open
mathriddle opened this issue May 1, 2024 · 1 comment
Labels
good first issue Good for newcomers issue:bug Something isn't working... For use in issues

Comments

@mathriddle
Copy link

Previously, running the command "from manim import *" all by itself in a Colab cell would result in the output "Manim Community v0.18.0". Then the manim code to make a video could be run in additional cells. With v0.18.1, however, no output is generated running that import command, but the "Manim Community v0.18.1" appears as the output after rendering a manim snippet in a subsequent cell, along with the message about "no video with supported format and MIME type found".

Adding the line config.media_embed=True to the cell with the import command does resolve the issue, but the "Manim Community v0.18.1" output still appears as the output along with the now functioning video.

@behackl behackl changed the title With v0.18.1 in Colab, no video produced when rendering a manim snippet Google Colab: Video data is no longer automatically embedded in the notebook May 1, 2024
@behackl
Copy link
Member

behackl commented May 1, 2024

The version spash shown on import has been disabled by default.

As for the video: it actually is being generated, Colab can just not display it if it is not directly embedded into the notebook source. The default behavior of this config option (config.media_embed) has been changed; it is False now by default, None is no longer an allowed value.

The corresponding code that needs to be updated is here:

if embed is None:
# videos need to be embedded when running in google colab.
# do this automatically in case config.media_embed has not been
# set explicitly.
embed = "google.colab" in str(get_ipython())

We should change this such that media_embed is True whenever the IPython magic is run on Colab.

@behackl behackl added good first issue Good for newcomers issue:bug Something isn't working... For use in issues labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers issue:bug Something isn't working... For use in issues
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants