{
  "id": 35239,
  "title": "Problem Accessing Google Bucket Data",
  "url": "/competitions/passenger-screening-algorithm-challenge/discussion/35239",
  "author_name": "",
  "post_date": "2017-06-25T00:42:40.300086300Z",
  "votes": 3,
  "comment_count": 7,
  "views": 2,
  "content": "<p>Hello!\nI've been attempting to access the data in the kaggle-tsa-stage1 Google Bucket via a python library provided by Google (<a href=\"https://cloud.google.com/storage/docs/reference/libraries\">https://cloud.google.com/storage/docs/reference/libraries</a>). \nI've been able to create/access/delete Buckets in my own projects, but when I try to establish a connection to kaggle-tsa-stage1, I receive the following error:</p>\n\n<pre><code>google.cloud.exceptions.Forbidden: 403 Caller does not have storage.buckets.get access to bucket kaggle-tsa-stage1\n</code></pre>\n\n<p>The minimum code to produce this error on my machine is:</p>\n\n<pre><code>from google.cloud import storage\nclient = storage.Client()\nclient.get_bucket('kaggle-tsa-stage1')\n</code></pre>\n\n<p>I've been screened, and I'm able to access the Google Bucket via my browser (and with Google's gsutil), but not with python.</p>\n\n<p>Has anyone been able to successfully connect to the Bucket using this library? Alternatively, is there some way people have found to access the data without downloading the entire set?</p>\n\n<p>Thanks!</p>",
  "messages": [
    {
      "id": "195768",
      "postDate": "06/25/2017 00:42:40",
      "content": "<p>Hello!\nI've been attempting to access the data in the kaggle-tsa-stage1 Google Bucket via a python library provided by Google (<a href=\"https://cloud.google.com/storage/docs/reference/libraries\">https://cloud.google.com/storage/docs/reference/libraries</a>). \nI've been able to create/access/delete Buckets in my own projects, but when I try to establish a connection to kaggle-tsa-stage1, I receive the following error:</p>\n\n<pre><code>google.cloud.exceptions.Forbidden: 403 Caller does not have storage.buckets.get access to bucket kaggle-tsa-stage1\n</code></pre>\n\n<p>The minimum code to produce this error on my machine is:</p>\n\n<pre><code>from google.cloud import storage\nclient = storage.Client()\nclient.get_bucket('kaggle-tsa-stage1')\n</code></pre>\n\n<p>I've been screened, and I'm able to access the Google Bucket via my browser (and with Google's gsutil), but not with python.</p>\n\n<p>Has anyone been able to successfully connect to the Bucket using this library? Alternatively, is there some way people have found to access the data without downloading the entire set?</p>\n\n<p>Thanks!</p>",
      "rawMarkdown": "Hello!\nI've been attempting to access the data in the kaggle-tsa-stage1 Google Bucket via a python library provided by Google (https://cloud.google.com/storage/docs/reference/libraries). \nI've been able to create/access/delete Buckets in my own projects, but when I try to establish a connection to kaggle-tsa-stage1, I receive the following error:\n\n    google.cloud.exceptions.Forbidden: 403 Caller does not have storage.buckets.get access to bucket kaggle-tsa-stage1\n  \nThe minimum code to produce this error on my machine is:\n\n    from google.cloud import storage\n    client = storage.Client()\n    client.get_bucket('kaggle-tsa-stage1')\n\nI've been screened, and I'm able to access the Google Bucket via my browser (and with Google's gsutil), but not with python.\n\nHas anyone been able to successfully connect to the Bucket using this library? Alternatively, is there some way people have found to access the data without downloading the entire set?\n\nThanks!",
      "votes": null
    },
    {
      "id": "195780",
      "postDate": "06/25/2017 01:42:04",
      "content": "<p>Can you see <a href=\"https://console.cloud.google.com/storage/browser/kaggle-tsa-stage1/?authuser=0&amp;pli=1\">the files</a> in a browser?  If not, you should re-read the \"Data and Access\" heading <a href=\"https://www.kaggle.com/c/passenger-screening-algorithm-challenge/data\">here.</a></p>",
      "rawMarkdown": "Can you see [the files][1] in a browser?  If not, you should re-read the \"Data and Access\" heading [here.][2]\n\n\n  [1]: https://console.cloud.google.com/storage/browser/kaggle-tsa-stage1/?authuser=0&amp;pli=1\n  [2]: https://www.kaggle.com/c/passenger-screening-algorithm-challenge/data",
      "votes": null
    },
    {
      "id": "195783",
      "postDate": "06/25/2017 01:46:42",
      "content": "<p>I'm able to view them in-browser, and I'm able to download them as well.</p>",
      "rawMarkdown": "I'm able to view them in-browser, and I'm able to download them as well.",
      "votes": null
    },
    {
      "id": "196662",
      "postDate": "06/27/2017 22:10:28",
      "content": "<p>Hrm, interesting!  My client seems to work.  Weird!  Sorry I cannot be of much more help -- do post back if you sort it out.</p>",
      "rawMarkdown": "Hrm, interesting!  My client seems to work.  Weird!  Sorry I cannot be of much more help -- do post back if you sort it out.",
      "votes": null
    },
    {
      "id": "197560",
      "postDate": "06/29/2017 20:22:02",
      "content": "<p>Hi Jerry, </p>\n\n<p>I think you're probably not authenticated to Google Cloud Platform. </p>\n\n<p>Here are some pointers to information. Let me know if these help: </p>\n\n<ul>\n<li><a href=\"https://cloud.google.com/storage/docs/reference/libraries#client-libraries-install-python\">Client Libraries guide for Python</a></li>\n<li><a href=\"https://cloud.google.com/python/setup\">Setting up a Python Development Environment</a></li>\n<li><a href=\"https://cloud.google.com/docs/authentication/\">Google Cloud Authentication Guide</a></li>\n</ul>",
      "rawMarkdown": "Hi Jerry, \n\nI think you're probably not authenticated to Google Cloud Platform. \n\nHere are some pointers to information. Let me know if these help: \n\n - [Client Libraries guide for Python](https://cloud.google.com/storage/docs/reference/libraries#client-libraries-install-python)\n - [Setting up a Python Development Environment](https://cloud.google.com/python/setup)\n - [Google Cloud Authentication Guide](https://cloud.google.com/docs/authentication/)",
      "votes": null
    },
    {
      "id": "200080",
      "postDate": "07/07/2017 03:46:31",
      "content": "<p>Same issue here. What's weird is I know I'm authenticated properly. I can even run <code>gsutil cp gs://kaggle-tsa-stage1/stage1_labels.csv .</code> and download a file from the bucket without a problem, but as soon as I start up python and run the same commands you did, I get the same error. Same thing happens when I tried to mount the bucket to my vm via FUSE too. Results were the same locally and on my compute vm.</p>",
      "rawMarkdown": "Same issue here. What's weird is I know I'm authenticated properly. I can even run `gsutil cp gs://kaggle-tsa-stage1/stage1_labels.csv .` and download a file from the bucket without a problem, but as soon as I start up python and run the same commands you did, I get the same error. Same thing happens when I tried to mount the bucket to my vm via FUSE too. Results were the same locally and on my compute vm.",
      "votes": null
    },
    {
      "id": "202652",
      "postDate": "07/13/2017 00:55:50",
      "content": "<p>Is there a way to download more than one file at a time using browser interface? I can download a single file w browser.</p>\n\n<p><strong>EDIT</strong></p>\n\n<p>Nevermind, I used <code>gsutil cp</code> command.</p>",
      "rawMarkdown": "Is there a way to download more than one file at a time using browser interface? I can download a single file w browser.\n\n**EDIT**\n\nNevermind, I used `gsutil cp` command.",
      "votes": null
    },
    {
      "id": "207523",
      "postDate": "07/26/2017 20:13:42",
      "content": "<p>Yep. There doesn't seem to be a way of downloading multiple files simultaneously aside from clicking each one. <code>gsutil cp</code> is definitely the way to go. </p>",
      "rawMarkdown": "Yep. There doesn't seem to be a way of downloading multiple files simultaneously aside from clicking each one. `gsutil cp` is definitely the way to go.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 195780,
      "author_name": "jangerhofer",
      "author_url": "",
      "post_date": "06/25/2017 01:42:04",
      "content": "<p>Can you see <a href=\"https://console.cloud.google.com/storage/browser/kaggle-tsa-stage1/?authuser=0&amp;pli=1\">the files</a> in a browser?  If not, you should re-read the \"Data and Access\" heading <a href=\"https://www.kaggle.com/c/passenger-screening-algorithm-challenge/data\">here.</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 195783,
          "author_name": "evanwall",
          "author_url": "",
          "post_date": "06/25/2017 01:46:42",
          "content": "<p>I'm able to view them in-browser, and I'm able to download them as well.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 196662,
          "author_name": "jangerhofer",
          "author_url": "",
          "post_date": "06/27/2017 22:10:28",
          "content": "<p>Hrm, interesting!  My client seems to work.  Weird!  Sorry I cannot be of much more help -- do post back if you sort it out.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 197560,
      "author_name": "stevegreenberg",
      "author_url": "",
      "post_date": "06/29/2017 20:22:02",
      "content": "<p>Hi Jerry, </p>\n\n<p>I think you're probably not authenticated to Google Cloud Platform. </p>\n\n<p>Here are some pointers to information. Let me know if these help: </p>\n\n<ul>\n<li><a href=\"https://cloud.google.com/storage/docs/reference/libraries#client-libraries-install-python\">Client Libraries guide for Python</a></li>\n<li><a href=\"https://cloud.google.com/python/setup\">Setting up a Python Development Environment</a></li>\n<li><a href=\"https://cloud.google.com/docs/authentication/\">Google Cloud Authentication Guide</a></li>\n</ul>",
      "votes": null,
      "replies": []
    },
    {
      "id": 200080,
      "author_name": "joeddav",
      "author_url": "",
      "post_date": "07/07/2017 03:46:31",
      "content": "<p>Same issue here. What's weird is I know I'm authenticated properly. I can even run <code>gsutil cp gs://kaggle-tsa-stage1/stage1_labels.csv .</code> and download a file from the bucket without a problem, but as soon as I start up python and run the same commands you did, I get the same error. Same thing happens when I tried to mount the bucket to my vm via FUSE too. Results were the same locally and on my compute vm.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 202652,
      "author_name": "pauljurczak",
      "author_url": "",
      "post_date": "07/13/2017 00:55:50",
      "content": "<p>Is there a way to download more than one file at a time using browser interface? I can download a single file w browser.</p>\n\n<p><strong>EDIT</strong></p>\n\n<p>Nevermind, I used <code>gsutil cp</code> command.</p>",
      "votes": null,
      "replies": [
        {
          "id": 207523,
          "author_name": "stevegreenberg",
          "author_url": "",
          "post_date": "07/26/2017 20:13:42",
          "content": "<p>Yep. There doesn't seem to be a way of downloading multiple files simultaneously aside from clicking each one. <code>gsutil cp</code> is definitely the way to go. </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "195768": "Hello!\nI've been attempting to access the data in the kaggle-tsa-stage1 Google Bucket via a python library provided by Google (https://cloud.google.com/storage/docs/reference/libraries). \nI've been able to create/access/delete Buckets in my own projects, but when I try to establish a connection to kaggle-tsa-stage1, I receive the following error:\n\n    google.cloud.exceptions.Forbidden: 403 Caller does not have storage.buckets.get access to bucket kaggle-tsa-stage1\n  \nThe minimum code to produce this error on my machine is:\n\n    from google.cloud import storage\n    client = storage.Client()\n    client.get_bucket('kaggle-tsa-stage1')\n\nI've been screened, and I'm able to access the Google Bucket via my browser (and with Google's gsutil), but not with python.\n\nHas anyone been able to successfully connect to the Bucket using this library? Alternatively, is there some way people have found to access the data without downloading the entire set?\n\nThanks!",
    "195780": "Can you see [the files][1] in a browser?  If not, you should re-read the \"Data and Access\" heading [here.][2]\n\n\n  [1]: https://console.cloud.google.com/storage/browser/kaggle-tsa-stage1/?authuser=0&amp;pli=1\n  [2]: https://www.kaggle.com/c/passenger-screening-algorithm-challenge/data",
    "195783": "I'm able to view them in-browser, and I'm able to download them as well.",
    "196662": "Hrm, interesting!  My client seems to work.  Weird!  Sorry I cannot be of much more help -- do post back if you sort it out.",
    "197560": "Hi Jerry, \n\nI think you're probably not authenticated to Google Cloud Platform. \n\nHere are some pointers to information. Let me know if these help: \n\n - [Client Libraries guide for Python](https://cloud.google.com/storage/docs/reference/libraries#client-libraries-install-python)\n - [Setting up a Python Development Environment](https://cloud.google.com/python/setup)\n - [Google Cloud Authentication Guide](https://cloud.google.com/docs/authentication/)",
    "200080": "Same issue here. What's weird is I know I'm authenticated properly. I can even run `gsutil cp gs://kaggle-tsa-stage1/stage1_labels.csv .` and download a file from the bucket without a problem, but as soon as I start up python and run the same commands you did, I get the same error. Same thing happens when I tried to mount the bucket to my vm via FUSE too. Results were the same locally and on my compute vm.",
    "202652": "Is there a way to download more than one file at a time using browser interface? I can download a single file w browser.\n\n**EDIT**\n\nNevermind, I used `gsutil cp` command.",
    "207523": "Yep. There doesn't seem to be a way of downloading multiple files simultaneously aside from clicking each one. `gsutil cp` is definitely the way to go."
  },
  "source": "meta"
}