Error importing module on deployment step flask python

Apparently, the deployment is not following what is defined in the requirements when installing the dependencies.

I have imported the movipy package, and everything works locally using a virtual environment, but during deployment, the service becomes unhealthy.

I tried switching to an older commit that was already deployed, but the issue with MoviePy persists. It seems to be related to caching, as it appears to be using an old cache instead of installing the package.

Hi!

If it is related to cache, can you try to redeploy with the “trigger the build” option? Do not select the “Use build cache” option.

Let me know if this solves your problem.

i already try thiss yesterday and now too. This not resolve the problem. I try to roolback to preview version of moviepy and this not work too

i try to change my region and this not work too

i remove any reference of moviepy in my project and create another one with moviepy to test until we resolve this

this is the new service: Koyeb

Hi @marcelo_diefenbach,

Just to be sure. You don’t have a file called moviepy.py in your repo? If you have, python will try to import from it instead of the desired lib.

I created a new service to test this error:

This service is using the MoviePy library, and it works normally locally. However, when I deploy it, the build process succeeds, but during the deployment step, I get an error saying that MoviePy does not exist in my project.

You can see in the requirements that MoviePy is included in the project.

In requirements.txt you install moviepy version 2.1.1. Your code fails with

ModuleNotFoundError: No module named 'moviepy.editor'

However, according to the docs, moviepy.editor was removed from version 2. It’s available only in version 1: Updating from v1.X to v2.X — MoviePy documentation