I'm working on a Google Cloud Function to create a Service Account key, following these instructions: https://cloud.google.com/iam/docs/creating-managing-service-account-keys. Every time I deploy the function, I get this error, but I don't understand it. Can you please let me know what I am doing wrong? I am specifying the Service Account to use by setting a variable with the account's email address. The service account has been given the "Service Account Key Admin" role.
Function failed on loading user code. Error message: Code in file main.py can't be loaded. Detailed stack trace: Traceback (most recent call last): File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py", line 359, in check_or_load_user_function _function_handler.load_user_function() File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v2.py", line 236, in load_user_function spec.loader.exec_module(main_module) File "", line 724, in exec_module File "", line 860, in get_code File "", line 791, in source_to_code File "", line 219, in _call_with_frames_removed File "/user_code/main.py", line 29 service_account_email = 'service-key-function-1@reference-rain-293933.iam.gserviceaccount.com' ^ TabError: inconsistent use of tabs and spaces in indentation