Unable to find file in Jupyter

I am trying to save an mp4 file using pypde using this

import numpy as np
#from pde import CartesianGrid, ScalarField, DiffusionPDE, FieldCollection
from pde import FieldCollection
from pde import (DiffusionPDE, UnitGrid, ScalarField, MemoryStorage,
                 PlotTracker, PrintTracker, RealtimeIntervals)
from pde.visualization import movies
import pde

storage = MemoryStorage()

trackers = [
    'progress',                    # show progress bar during simulation
    'steady_state',                # abort when steady state is reached
    storage.tracker(interval=1),   # store data every simulation time unit
    PlotTracker(show=True),        # show images during simulation
    # print some output every 5 real seconds:
    PrintTracker(interval=RealtimeIntervals(duration=1))
]

grid = pde.UnitGrid([64, 64])
field2 = ScalarField.random_uniform(grid, 1, 1)  # generate initial condition
field1 = ScalarField.random_harmonic(grid)  # generate initial condition
state = FieldCollection.scalar_random_uniform(2, grid)
state = FieldCollection([field1,field2]);


eq = pde.WavePDE(speed=0.1);
result = eq.solve(state, t_range=3, dt=1, tracker = trackers)
result.plot(show=True)                                 # plot the resulting field
movies.movie_multiple(storage, r'testfile.mp4')

it gives me this error:

FileNotFoundError: [WinError 2] The system cannot find the file specified

what should I do?

I don’t know, but it doesn’t seem to be a Jupyter question?

Questions about errors from python code are best addressed to the packages that are giving the error. In this case, it looks like the error is coming from that pde package? If so, asking on that package’s support channels would probably be more helpful to you.

2 Likes