title: read google bucket files using python
body: <p>I have to read google bucket files which are in xlsx format.
  The file structure in the bucket look like</p>
  <pre><code>bucket_name
         folder_name_1
                 file_name_1
         folder_name_2
         folder_name_3
                  file_name_3
  </code></pre>
  <p>The python snippet looks like</p>
  <pre><code>def main():
      storage_client = storage.Client.from_service_account_json(
          Constants.GCP_CRENDENTIALS)
      bucket = storage_client.bucket(Constants.GCP_BUCKET_NAME)
  
      blob = bucket.blob(folder_name_2 + '/' + Constants.GCP_FILE_NAME)
  
      data_bytes = blob.download_as_bytes()
  
      df = pd.read_excel(data_bytes, engine='openpyxl')
      print(df)
  
  def function1():
       print(&quot;no file in the folder&quot;) # sample error
  </code></pre>
  <p>In the above snippet, I'm trying to open <code>folder_name_2</code>, it returns an error because there's no file to read.</p>
  <p>Instead of throwing an error, I need to use <code>function1</code> to print the error whenever there's no file in any folder.</p>
  <p>Any ideas of doing this?</p>