terraform-google-modules/terraform-google-slo

Bug with latest version

ocervell opened this issue · 0 comments

Error: Error waiting for Creating CloudFunctions Function: Error code 3, message: Function failed on loading user code. Error message: Code in file main.py can't be loaded.
Did you list all required modules in requirements.txt?
Detailed stack trace:
Traceback (most recent call last):
  File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v1.py", line 315, in check_or_load_user_function
    _function_handler.load_user_function()
  File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker_v1.py", line 190, in load_user_function
    spec.loader.exec_module(main_module)
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/user_code/main.py", line 21, in <module>
    from slo_generator import compute
ModuleNotFoundError: No module named 'slo_generator'

To fix, upgrade your slo_generator_version to 1.1.2.