Comments (7)
Thanks for the wonderful code @bachvtuan. I ran into the same error and tried using ServiceAccountCredentials to replace the SignedJwtAssertionCredentials. However, I got another global name 'self' error. Then, I reverted to the original script from @bachvtuan, did pip install oauth2client==1.5.2 as suggested by @budiwijaya and finally did pip install pyopenssl and problem SOLVED!
from backup-to-google-drive.
Hi make sure you installed
easy_install --upgrade google-api-python-client
If it's fail, you can try install this package
easy_install --upgrade oauth2client
from backup-to-google-drive.
didn't fix the problem.
and following this: http://stackoverflow.com/questions/14063124/importerror-cannot-import-name-signedjwtassertioncredentials
when I do: pip install pycrypto
I get this error:
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0tdN9M/pycrypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-aa_Afz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0tdN9M/pycrypto/
from backup-to-google-drive.
You may need install dependency package if you're using Ubuntu, Debian.
apt-get install python-dev
When done, You may need to install
pip install pycrypto
pip install pyOpenSSL==0.12
from backup-to-google-drive.
Hi, this error is because of oauth2client needs version 1.5.2
You can try to this command easy_install oauth2client==1.5.2
ref: googleapis/google-api-python-client#193
from backup-to-google-drive.
@foxhound87 let me know if you can fix it by using the method from @budiwijaya .
from backup-to-google-drive.
Google deprecated the SignedJwtAssertionCredentials
class in favor of the ServiceAccountCredentials
class
- p12 work flow
from oauth2client.service_account import ServiceAccountCredentials
client_email = '[email protected]'
scopes = ['https://www.googleapis.com/auth/sqlservice.admin']
credentials = ServiceAccountCredentials.from_p12_keyfile(
client_email, '/path/to/keyfile.p12', scopes=scopes)
- Json workflow
from oauth2client.service_account import ServiceAccountCredentials
scopes = ['https://www.googleapis.com/auth/sqlservice.admin']
credentials = ServiceAccountCredentials.from_json_keyfile_name(
'/path/to/keyfile.json', scopes=scopes)
from backup-to-google-drive.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backup-to-google-drive.