When I run my python script, it gives me the following error. Not sure how to resolve it. I think so either the problem is in the version of python, I am using python 3.6 or It could be some packages not included. Please see the included image for error. Thanks. Error
Code:
f = open('c:\ExamCreator\My Project-9352ed298182.json')
key = f.read()
f.close()
credentials = ServiceAccountCredentials(
'CLIENT_EMAIL', key,
scope=
'https://www.googleapis.com/auth/admin.directory.user',
sub='[email protected]'
)
http = httplib2.Http()
http = credentials.authorize(http)
userinfo = {
'primaryEmail': '[email protected]',
'name': {
'givenName':'John','familyName':'Smith'
},
'password': 'Hello1'
}
service = build("admin", "directory_v1", http=http)
service.users().insert(body=userinfo).execute()
signerdeclared and assigned to a string?