Pulling a movie from a python package

So I am using asilib documentation which creates animations of the aurora in a subfolder asilib-data/animations/ however, when I try to access it I get a filenotfound error. Looking at the documentation it seems like it has to be in the local directory, however, there is no way to change the path where it is saved. Any solutions. I did a os path and I got location of my folder to be /mount/src/physics_work/Aurora_Work/home.py and the folder to be in /home/appuser/asilib-data

the code I have to grab it is
movie_address_total = r"/home/appuser/asilib-data/animations/{}".format(movie_address) which when writte gives as expected.

The error is:

File "/mount/src/physics_work/Aurora_Work/home.py", line 532, in Animation_function_caller
    clip1 = VideoFileClip(r"{}".format(animation_strings[0]))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/home/adminuser/venv/lib/python3.11/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in __init__
    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/home/adminuser/venv/lib/python3.11/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in __init__
    infos = ffmpeg_parse_infos(filename, print_infos, check_duration,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/home/adminuser/venv/lib/python3.11/site-packages/moviepy/video/io/ffmpeg_reader.py", line 270, in ffmpeg_parse_infos
    raise IOError(("MoviePy error: the file %s could not be found!\n"

Hi @Cassandra!

Could you please share the code snippet you are running, including the requirements.txt you are using, so I can reproduce the issue?

Alternatively, if this is a public github repository, can you please point me to it?

Thank you!

Best,
George

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.