Thursday, March 12, 2015

Code Journal

I am working on a website that is deployed on many VPSs hosted in different datacenters and updated through a CSV file stored on a customers Google drive account. So I start to flesh out the code that is going to monitor the CSV for changes and retrieve it and figure a good place to start is with the google api docs and install using pip as advised but find that the google-api-python-client is erroring out in python 3.3. So I bang my head against the desk for a while googling, searching stack overflow, and in final desperation consider just using the REST API with out a library to help but before I go that route that I figure I should go to where ever the code is hosted and check the issues and post a new one if need be. So I go to google code only to be directed to a github repository. (Has google code been abandoned? Its future doesn't seem bright when even google projects are moving off of it.) I read to the bottom of the issue regarding python 3 compatibility and it appears to be resolved. I download the zip file from github unzip it and run python setup.py install try running the sample code in the google drive api quick start and success everything runs without error. 

The take away is that when you run into issues with libs from PyPi try going to the source first and build and install the latest version it is likely to prevent frustration and save time.

No comments:

Post a Comment