My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
GettingStarted  
How to configure your environment to use this library.
Phase-Deploy, Featured
Updated Jul 8, 2010 by vicfry...@google.com

Introduction

See this article: Getting Started With the Google Data Python Library

Details

The article I've linked to covers the following topics:

  • Introduction
  • Installing Python
    • On Windows
    • On Mac OS X
    • On Linux
  • Installing Dependencies
  • Installing the Google Data Library
  • Running Tests and Samples
  • Writing A "Hello World" Example
  • Conclusion
  • Appendix: Modifying the PYTHONPATH

Comment by maryptho...@gmail.com, Jun 3, 2009

this introduction does not include any instructions for when you get an ERROR.

Comment by jspatr...@gmail.com, Jun 8, 2009

I also received errors. Not sure where to turn to figure this out:

Running all tests in module gdata_tests.docs_test ....EE..

ERROR: testToAndFromStringWithData (gdata_tests.docs_test.DocumentListEntryTest?)


Traceback (most recent call last):

File "C:\Users\John\gdata-1.3.3\tests\gdata_tests\docs_test.py", line 46, in t
estToAndFromStringWithData
self.assertEqual(entry.writersCanInvite.value, 'true')
AttributeError?: 'NoneType?' object has no attribute 'value'

ERROR: testConvertActualData (gdata_tests.docs_test.DocumentListFeedTest?)


Traceback (most recent call last):
File "C:\Users\John\gdata-1.3.3\tests\gdata_tests\docs_test.py", line 73, in t
estConvertActualData
self.assertEqual(an_entry.writersCanInvite.value, 'true')
AttributeError?: 'NoneType?' object has no attribute 'value'


Ran 8 tests in 0.020s

FAILED (errors=2)

Running all tests in module gdata_tests.health_test ...............

Comment by rkimbrel...@gmail.com, Jun 26, 2009

With python 2.6 I get "ImportError?: No module named test_config" which I can't figure out because it's in the directory and also test_data imports successfully.

Comment by laser.y...@gmail.com, Aug 19, 2009

I also have the problem that rkimbrell1449 discribed

Comment by aneeshvkulkarni@gmail.com, Aug 25, 2009

I also have the problem that rkimbrell1449 and laser.yuan mentioned. Why is there no module called test_config in the provided code?

Comment by coff.sy...@gmail.com, Aug 30, 2009

I too am experiencing the problem mentioned by rkimbrell1449, laser.yuan, and aneeshvkulkarni.

Please help us out...

Comment by catalyst...@gmail.com, Sep 1, 2009

I received a similar import error about not being able to find the test_config module. I've just started digging into this myself to see what the root cause is... I'm on Ubuntu Jaunty running Python 2.6.2

Comment by EyalWie...@gmail.com, Sep 2, 2009

is there a solution for this? ^

Comment by tokutsu....@gmail.com, Sep 7, 2009

> "ImportError??: No module named test_config". I think $PYTHONPATH should include the path to "gdata-2.0.?/src" or installed directory which has atom/ and gdata/ directories. "import gdata.test_config" means to import gdata/test_config.py

Comment by mototo...@gmail.com, Nov 4, 2009

On Ubuntu 9.04, I moified my PYTHONPATH as follow "export PYTHONPATH=/usr/local/lib/python2.6/dist-packages", and I could run tests/run_data_tests.py

Comment by aditya.s...@gmail.com, Nov 11, 2009

I tried doing the above (mototopad) and also tried using python2.5 instead of 2.6, but still getting same error. I'm on Ubuntu 9.10. Any help?

Comment by aditya.s...@gmail.com, Nov 11, 2009

Workaround: copy paste src/gdata and src/atom to the current working directory. Will make sure they're found.

Comment by mike.riv...@gmail.com, Nov 29, 2009

Thank you aditya.sahay for the solution

Comment by frantic....@gmail.com, Dec 1, 2009

I did the unpacking as root, and found I had to do all the following before I got it to work:

Opened ~/.bashrc added the following lines (the <path to> means the path where you put it, such as /usr/local/lib/python2.6/): <path to>gdata-2.0.5/src/atom <path to>gdata-2.0.5/src/gdata <path to>gdata-2.0.5/tests/atom_tests <path to>gdata-2.0.5/tests/gdata_tests

Then I saved the file. In terminal add the following lines: $ source ~/.bashrc

Then I made sure that the permissions were not giving me any problems: $ sudo chmod -R 755 <path to>/gdata-2.0.5

I am not sure if that is the 'right' way, but it worked (so far) for me.

Comment by mahi...@gmail.com, Dec 11, 2009

Thanx mototopad export PYTHONPATH=/usr/local/lib/python2.6/dist-packages solved the problem

Comment by eric...@gmail.com, Dec 20, 2009

On Darwin Kernel Version 10.2.0, I installed the py26-gdata package with the port collection. Then, I modified PYHTONPATH to: export PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages

Comment by lifeonma...@gmail.com, Dec 30, 2009

The installer seems to be broken or it is at least not working for all Python versions/operating systems/distributions etc. On Ubuntu 9.10 with Python 2.6.4 it has no effect at all, because it copies the files to /usr/local/lib instead of /usr/lib.

On Ubuntu, this is what should worked for most people:

sudo ./setup.py install

sudo mv /usr/local/lib/python2.6/dist-packages/* /usr/lib/python2.6/dist-packages

Comment by nickhatc...@gmail.com, Dec 31, 2009

lifeonmars.config - Thank you. I am on Ubuntu 9.1 with Python 2.6.4 and this resolved my issues. I am not able to run all apps that utilize the library without the PYTHONPATH variable.

Comment by nvsbl.mo...@gmail.com, Feb 26, 2010

lifeonmars.config ftw. Props, holmes.

Comment by cldx3...@gmail.com, Jun 19, 2010

lifeonmars.config youre the Man. Who'd though a simple mv would spare me fiddling around with Environment Vars and .bash-aliases

Comment by m...@chevron.com, Jun 19, 2010

lifeonmars.config you did it for me too. Why couldn't they have gotten this right in the first place?

Comment by pandadol...@gmail.com, Jun 21, 2010

lifeonmars.config - thank you. I am on Ubuntu 10.04 x64 with Python 2.6

Comment by pauleuba...@gmail.com, Jun 22, 2010

Do you really want to mv those files? Can't you accomplish the same with a symlink?

Comment by emmettst...@gmail.com, Jun 27, 2010

lifeonmars.config: I can confirm on 32bit Ubuntu 10.04 python 2.6, the mv statement makes it all just work.

Comment by Jacob.Bl...@gmail.com, Jun 30, 2010

The move worked for Ubuntu 10.04 64bit, Python 2.6.

Any explanation as to why? I am using Eclipse as my IDE with pydev. The system pythonpath includes both /usr/local/lib/python2.6/dist-packages and /usr/lib/python2.6/dist-packages.

I also tried adding the specific folder paths in the individual project's external libraries, which I assume gets added onto the pythonpath variable.

But I guess if it works it works...

Comment by sven.wes...@gmail.com, Jul 24, 2010

The correct way would be to use the --prefix flag when running setup.py install

Like this:

./setup.py install --prefix='/usr'
Comment by JoshS.Si...@gmail.com, Nov 10, 2010

thanks Sven!

Comment by bde...@gmail.com, Mar 3, 2012

Having problems with the install on Win7. I'm running Python 2.6 which was installed in an unusual spot: C:\Python26\ArcGIS10.0\. After installing gdata, everything runs fine if the program is in the gdata directory. Anywhere else and I receive the error "ImportError?: No module named docs.service".

I've modified the PYTHONPATH variable to "C:\Python26\ArcGIS10.0\Lib", but it still will not find the libraries for gdata. All of the other libraries are found without a problem.

Anyone have a suggestion?


Sign in to add a comment
Powered by Google Project Hosting