Title: oauth2 error '_module' dict entry · Issue #13 · googleworkspace/python-samples · GitHub
Open Graph Title: oauth2 error '_module' dict entry · Issue #13 · googleworkspace/python-samples
X Title: oauth2 error '_module' dict entry · Issue #13 · googleworkspace/python-samples
Description: Hi, I am trying to get the python quickstart.py to work described here: https://developers.google.com/drive/api/v3/quickstart/python I also ran into #12, but additionally I am having issues loading the credentials.json that I downloaded ...
Open Graph Description: Hi, I am trying to get the python quickstart.py to work described here: https://developers.google.com/drive/api/v3/quickstart/python I also ran into #12, but additionally I am having issues loading...
X Description: Hi, I am trying to get the python quickstart.py to work described here: https://developers.google.com/drive/api/v3/quickstart/python I also ran into #12, but additionally I am having issues loading...
Opengraph URL: https://github.com/googleworkspace/python-samples/issues/13
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"oauth2 error '_module' dict entry","articleBody":"Hi,\r\n\r\nI am trying to get the python quickstart.py to work described here:\r\nhttps://developers.google.com/drive/api/v3/quickstart/python\r\n\r\nI also ran into #12, but additionally I am having issues loading the credentials.json that I downloaded when I enabled the Drive API per the link above.\r\n\r\nIt appears that the oauth2client module is attempting to extract a '_module' entry, which doesn't exist in the credentials.json file generated during the download.\r\n\r\nI've been using python for a while, but this is the first time in a couple of years I'm playing with the google APIs. Not sure if this is something I'm doing wrong or if I stumbled on a bug.\r\n\r\nipython dump below. I confirmed that the data is a dict with the contents of the credentials.json file.\r\n\r\n[edit: Note that I moved the credentials.json file into the same directory as the quickstart.py directory.]\r\n\r\nThanks,\r\n- Josh.\r\n\r\n\r\n\r\n```\r\n(C:\\Users\\josh\\Anaconda3\\envs\\py35) d:\\somedir>ipython --pdb quickstart.py\r\n---------------------------------------------------------------------------\r\nKeyError Traceback (most recent call last)\r\nd:\\somedir\\quickstart.py in \u003cmodule>()\r\n 15 #store = file.Storage('PublishPdf.json')\r\n 16 store = file.Storage('credentials.json')\r\n---> 17 creds = store.get()\r\n 18 if not creds or creds.invalid:\r\n 19 flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)\r\n\r\nC:\\Users\\josh\\Anaconda3\\envs\\py35\\lib\\site-packages\\oauth2client\\client.py in get(self)\r\n 405 self.acquire_lock()\r\n 406 try:\r\n--> 407 return self.locked_get()\r\n 408 finally:\r\n 409 self.release_lock()\r\n\r\nC:\\Users\\josh\\Anaconda3\\envs\\py35\\lib\\site-packages\\oauth2client\\file.py in locked_get(self)\r\n 52\r\n 53 try:\r\n---> 54 credentials = client.Credentials.new_from_json(content)\r\n 55 credentials.set_store(self)\r\n 56 except ValueError:\r\n\r\nC:\\Users\\josh\\Anaconda3\\envs\\py35\\lib\\site-packages\\oauth2client\\client.py in new_from_json(cls, json_data)\r\n 300 # Find and call the right classmethod from_json() to restore\r\n 301 # the object.\r\n--> 302 module_name = data['_module']\r\n 303 try:\r\n 304 module_obj = __import__(module_name)\r\n\r\nKeyError: '_module'\r\n> c:\\users\\josh\\anaconda3\\envs\\py35\\lib\\site-packages\\oauth2client\\client.py(302)new_from_json()\r\n 300 # Find and call the right classmethod from_json() to restore\r\n 301 # the object.\r\n--> 302 module_name = data['_module']\r\n 303 try:\r\n 304 module_obj = __import__(module_name)\r\n\r\nipdb>\r\n```\r\n\r\n","author":{"url":"https://github.com/bertram1isu","@type":"Person","name":"bertram1isu"},"datePublished":"2018-07-05T19:47:40Z","url":"https://github.com/googleworkspace/python-samples/issues/13"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ceef97b6-384d-1708-6635-62e96d56c260 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD10:C5D2C:64045:7BEDB:6B08886B |
| html-safe-nonce | 4a848d8182fdcd27c363036bb59e72c1eef3d2fa2e1b05b57b2d28c56f1dca5f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDEwOkM1RDJDOjY0MDQ1OjdCRURCOjZCMDg4ODZCIiwidmlzaXRvcl9pZCI6IjY2OTYyNjk2OTE3ODQ1NjI3OTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 173f98a806bccb77c352f08b4ef26bb61b8baa0c702cbe8c69a13ae83b5e6525 |
| hovercard-subject-tag | issue:338703520 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleworkspace/python-samples/13/issue_layout |
| twitter:image | https://opengraph.githubassets.com/78e06494799ec8215ca3899c5817bc5c65ba7cb7ae158a0794ee6512a9c225df/googleworkspace/python-samples/issues/13 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/78e06494799ec8215ca3899c5817bc5c65ba7cb7ae158a0794ee6512a9c225df/googleworkspace/python-samples/issues/13 |
| og:image:alt | Hi, I am trying to get the python quickstart.py to work described here: https://developers.google.com/drive/api/v3/quickstart/python I also ran into #12, but additionally I am having issues loading... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bertram1isu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60e86161f3e246339ce8d4bd308e3da0ecd5ebd5e610d57e00d21487fe085d68 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleworkspace/python-samples git https://github.com/googleworkspace/python-samples.git |
| octolytics-dimension-user_id | 3708359 |
| octolytics-dimension-user_login | googleworkspace |
| octolytics-dimension-repository_id | 14163863 |
| octolytics-dimension-repository_nwo | googleworkspace/python-samples |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14163863 |
| octolytics-dimension-repository_network_root_nwo | googleworkspace/python-samples |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e87e2b0f8aff9e45b7ac6c81be5a939ad971830c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width