Open Shubham-Kumar-2000 opened 2 years ago
Hi @Shubham-Kumar-2000, were you able to get around this error?
So, I ended up editing the moviepy package code directly and ignoring the pycache folder from the import loop inside /path/to/moviepy/video/fx/all/__init__.py
and /path/to/moviepy/audio/fx/all/__init__.py
then compressing the files and uploading back to AWS Lambda
Example code for /path/to/moviepy/video/fx/all/__init__.py
"""
Loads all the fx !
Usage:
import moviepy.video.fx.all as vfx
clip = vfx.resize(some_clip, width=400)
clip = vfx.mirror_x(some_clip)
"""
import pkgutil
import moviepy.video.fx as fx
__all__ = [name for _, name, _ in pkgutil.iter_modules(
fx.__path__) if name != "all" and name != "__pycache__"]
for name in __all__:
exec("from ..%s import %s" % (name, name))
You can do the same for /path/to/moviepy/audio/fx/all/__init__.py
Hope this helps someone looking for a quick hacky fix.
for me it was happening while using slim: true
in zappa
to deploy
I am trying to deploy a simple application on aws lambda using zappa but I get this error every time.
I am new to python thus don't know what exactly this means. Any help is appreciated.