reallistic / BitcasaFileLister

List and download files in your bitcasa drive via api
https://rose-llc.com/bitcasafilelist/
16 stars 3 forks source link

GDrive oauth error #34

Closed Rick7C2 closed 10 years ago

Rick7C2 commented 10 years ago

Trying to get google api auth when I run the following command It opens browser to sign in. Good, but when I look back at terminal I see the following error.

I got the same when trying to auth bitcasa but was able to run pyton getfiles.py --settoken but there doesn't seem to be a --settoken option for gdrive.py. Not sure what file name it saves it to such as token.ini for bitcasa auth.

Command: python gdrive.py

Error

11/04/2014 07:14:04 [MainThread][INFO]: Logging loaded ./runlog.txt 11/04/2014 07:14:04 [MainThread][ERROR]: Connection test failed Traceback (most recent call last): File "gdrive.py", line 57, in test_auth http = self.credentials.authorize(http) AttributeError: 'NoneType' object has no attribute 'authorize' No handlers could be found for logger "oauth2client.util" 11/04/2014 07:14:04 [MainThread][INFO]: https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&redirect_uri=https%3A%2F%2Frose-llc.com%2Fbitcasafilelist%2Fgoogle%2F&response_type=code&client_id=209996072777-uqfb5rt8acelm9isq225ljrls85jb7dl.apps.googleusercontent.com&access_type=offline Enter token (process:2644): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

reallistic commented 10 years ago

Please try the following:

pip install --upgrade google-api-python-client

The google drive api does not have a --settoken functionality. Instead, it will prompt you to enter it after launching your browser. (the second to last line in your snippet).

I have added this step to the wiki as well

Rick7C2 commented 10 years ago

Still getting the same error. The problem is after I login to Google drive and try to copy and past my token my terminal is already showing that error. I tried pasting it anyways but it didn't take.

ghost commented 10 years ago

Sounds like you haven't pasted your Google Drive API Key after Gdrive Auth

Rick7C2 commented 10 years ago

This is me trying to get Google auth it errors before I can Paste it.

reallistic commented 10 years ago

Can you do a git pull and try it again?

reallistic commented 10 years ago

Also please see #36 for other known issues.

Rick7C2 commented 10 years ago

Still having this issue using latest pull...

python BitcasaFileFetcher oauth --provider gdrive 11/10 19:34:42 [MainThread][INFO]: Logging loaded Enter token (process:2537): GLib-CRITICAL : g_slice_set_config: assertion 'sys_page_size == 0' failed **MY PASTED TOKEN 11/10 19:35:24 [MainThread][ERROR]: Error authenticating to Google drive Traceback (most recent call last): File "/home/rick7c2/BFL/BitcasaFileFetcher/main.py", line 198, in main g.get_service(True) File "/home/rick7c2/BFL/includes/lib/gdrive.py", line 211, in get_service self.auth(promptForAuth) File "/home/rick7c2/BFL/includes/lib/gdrive.py", line 196, in auth self.credentials = flow.step2_exchange(code) File "/usr/local/lib/python2.7/dist-packages/oauth2client/util.py", line 129, in positional_wrapper return wrapped(_args, *_kwargs) File "/home/rick7c2/BFL/includes/lib/oauth2client/client.py", line 1825, in step2_exchange headers=headers) File "/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg/httplib2/init.py", line 1593, in request (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey) File "/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg/httplib2/init.py", line 1335, in _request (response, content) = self._conn_request(conn, request_uri, method, body, headers) File "/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg/httplib2/init.py", line 1257, in _conn_request conn.connect() File "/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg/httplib2/init.py", line 1021, in connect self.disable_ssl_certificate_validation, self.ca_certs) File "/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg/httplib2/init.py", line 80, in _ssl_wrap_socket cert_reqs=cert_reqs, ca_certs=ca_certs) File "/usr/lib/python2.7/ssl.py", line 487, in wrap_socket ciphers=ciphers) File "/usr/lib/python2.7/ssl.py", line 241, in init ciphers) SSLError: [Errno 185090050] _ssl.c:344: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib 11/10 19:35:24 [MainThread][INFO]: Done rick7c2@ubuntu:~/BFL$ 1415666144366 GMPInstallManager.simpleCheckAndInstallINFO Last check was: 107031 seconds ago, minimum seconds: 86400 1415666144366 GMPInstallManager._getURL INFO Using url: https://aus4.mozilla.org/update/3/GMP/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml 1415666144366 GMPInstallManager._getURL INFO Using url (with replacement): https://aus4.mozilla.org/update/3/GMP/33.0/20141013200257/Linux_x86_64-gcc3/en-US/release/Linux%203.13.0-39-generic%20(GTK%202.24.23)/canonical/1.0/update.xml 1415666144367 GMPInstallManager.checkForAddons INFO sending request to: https://aus4.mozilla.org/update/3/GMP/33.0/20141013200257/Linux_x86_64-gcc3/en-US/release/Linux%203.13.0-39-generic%20(GTK%202.24.23)/canonical/1.0/update.xml 1415666144890 GMPInstallManager.onLoadXML INFO request completed downloading document 1415666144890 GMPInstallManager.onLoadXML INFO allowNonBuiltIn: false 1415666144893 GMPInstallManager.simpleCheckAndInstall INFO Found 1 addons advertised. 1415666144893 GMPInstallManager.simpleCheckAndInstall INFO Found addon: gmp-gmpopenh264 (isValid: true, isInstalled: true, isOpenH264: true, hashFunction: sha512, hashValue: 737e49f25aace93d470f1a781c69c3cdd0c9db21afe62221fb171d38a31d8a2b55af01a69cd00e7352e7a34aa450b6b85729509f81582379394785b37997a423, size: 385889) 1415666144894 GMPInstallManager.simpleCheckAndInstall INFO No new addons to install, returning

Rick7C2 commented 10 years ago

11/10 19:34:42 [MainThread][INFO]: Logging loaded Enter token (process:2537): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

This happens before I even get a chance to login via browser.