title: Google Cloud Functions: error deploying, main.py doesn't exist
body: <p>Deploying Google Cloud Functions from the local system fails with the following error:</p>
  
  <pre><code>ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Function load error: File main.py that is expected to define function doesn't exist
  </code></pre>
  
  <p>I've used the console UI to check the contents of the package that was uploaded in the failed deployment and the <em>file is present</em>. The package was created using the <code>gcloud</code> CLI:</p>
  
  <pre><code>gcloud functions deploy &lt;redacted&gt; \
      --trigger-http \
      --runtime=python37 \
      --region=europe-west1 \
      --project=&lt;redacted&gt; \
      --entry-point=&lt;redacted&gt;
  </code></pre>
  
  <p>For context, the same project was deployed successfully multiple times by several people but started failing for everyone new that checked it out after a specific date.</p>