I sometimes get this error with Node.JS when my pipeline fails to build the functions code correctly. I use this error as an indication that Firebase can't read my functions code (for whatever reason).
Are you running the correct version or Python? Are you building the python package correctly?