[ python ] google sheet API in parallel

Problem

No handlers could be found for logger “oauth2client.contrib.lock_file”

Solution

import logging
logging.basicConfig()

ref : http://stackoverflow.com/questions/345991/python-no-handlers-could-be-found-for-logger-opengl-error

Then Another Problem

WARNING:oauth2client.contrib.locked_file:Could not acquire lock c:\users\phongs~1.e\appdata\local\temp\google-api-python-client-discovery-doc.cache.lock in 0 seconds

Solution

We can disable cache_discovery by setting cache_discovery=False

service = build('sheets', 'v4', cache_discovery=False, http=http,
discoveryServiceUrl=discoveryUrl)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s