C1W2: Video Generation (Optional).ipynb

When one tries to run the 2nd cell with code, the line “from moviepy.editor import ImageSequenceClip” gives the following error message “RuntimeError: imageio.ffmpeg.download() has been deprecated. Use ‘pip install imageio-ffmpeg’ instead.'”
I’ve installed ‘imageio’ library and tried out with ‘imageio.imread’ and ‘imageio.imwrite’ but couldn’t yet find a workaround.

If you are running things locally or in some different environment than the course website, you need to make sure you use the compatible versions of all the packages or you will hit “versionitis” cases like this. The GANs courses are a couple of years old at this point and things mutate pretty quickly in the general python package space. Here’s a thread from DLS that shows how to figure out what versions you need, although there are no “official” instructions for running in a different environment. Most of what is said on that thread should be applicable, but the one big difference is that DLS uses TensorFlow, not PyTorch, so that’s one area where it won’t be applicable.

There are so many other external environments (PyCharm, VSCode, Colab, spyder …) that it’s not reasonable to expect the course staff to provide you with support for all of them. They have given you a working environment on the course website. If you want to use a different environment, you have to have the skills to figure out how to make that work. It’s fine to ask questions like that here and maybe you’ll get lucky and someone else will have explored a similar environment to the one you are using, but the high level point is that you can’t expect guaranteed support from the mentors or the course staff. That DLS thread I referenced was provided by a member of the community who wanted to help their fellow students. If you figure things like this out, it would be a nice thing to contribute your knowledge to the community as well. :nerd_face:

Many thanks for the information. That’s actually quite useful to know!

Could you still confirm one thing … I am opening the Colab notebook by clicking in the provided link from inside the course website. I thought that doing it this way it would automatically load the course environment. But now I guess the answer is no and there is no simpler way to load the course environment into Colab? But one should instead follow the steps in the link you have sent and extract the needed information based on the same course and week python notebook environment.

Oh, sorry, it’s been a while since I worked any of the GANs assignments, so I had forgotten that they use Colab as their execution environment. So maybe I’m not the right person to answer this question, but I think it’s the case that Colab just uses current versions of the support packages. If I’ve got this right, then that is a problem in general with this approach based on Colab. If you can’t control what versions are actually used, then you’ll just have to dig deeper and figure out how to adapt the code to the packages du jour. Sorry that I can’t give a better answer, but maybe one of the active GANs mentors will also notice this and give a real answer.

Hi @Bernardo_Costa,
@paulinpaloalto was right originally that most of the time, like with the graded assignments, this course uses the Coursera environment which opens in your browser with a blue coursera logo in the upper left corner.

But, some of the optional notebooks use the Colab environment. As Paul mentioned, version changes can lead to dependency mismatches like you’ve found here, but it is on the GANS team to keep all the notebooks they provide up-to-date and working in the environment they’re published in, so I’ll report this to the development team so they can update the notebook.

In the meantime, as a work-around, you can add the line:
!pip install imageio==2.4.1

directly above the line:
!pip install moviepy