Guest User

Untitled

a guest
Jan 15th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. google-cloud-storage
  2. --find-links ..........
  3.  
  4. import logging
  5. import sys,os
  6. #sys.path.append(r"C:UsersMahdieclipse-workspacegoogle-cloud-functions")
  7. #...
  8.  
  9. sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(sys.path[0]))))))
  10.  
  11. from com.mahdi.python.file_ingestion.file_ingestion_handler import FileIngestionHandler
  12.  
  13. C:UsersMahdieclipse-workspacegoogle-cloud-functionscommahdipythonfunctionsgcs>gcloud functions deploy gcs_object_insert --
  14. runtime python37 --trigger-resource small-files --trigger-event google.storage.object.finalize
  15. Deploying function (may take a while - up to 2 minutes)...failed.
  16. ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Function failed on loading user code. Error message: Code in file
  17. main.py can't be loaded.
  18. Did you list all required modules in requirements.txt?
  19. Detailed stack trace: Traceback (most recent call last):
  20. File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker.py", line 256, in check_or_load_user_function
  21. _function_handler.load_user_function()
  22. File "/env/local/lib/python3.7/site-packages/google/cloud/functions/worker.py", line 166, in load_user_function
  23. spec.loader.exec_module(main)
  24. File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  25. File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  26. File "/user_code/main.py", line 7, in <module>
  27. from com.mahdi.python.file_ingestion.file_ingestion_handler import FileIngestionHandler
  28. ModuleNotFoundError: No module named 'com'
Add Comment
Please, Sign In to add comment