I have a Google Cloud Function on Python 3.7 that does not take any input arguments. When I try to run it, it gives the following error:
TypeError: google_cloud_function() takes 0 positional arguments but 2 were given
The actual function code looks something like this (with different bash functions called):
import subprocess
def google_cloud_function():
subprocess.call(["ls"], shell=True)
subprocess.call(["pwd"], shell=True)
Why would this be the case?
A background Cloud Function triggered by something like GCS should have the following function signature:
The arguments need to be included even if you aren't using them.