My favorites | Sign in
Google
                
Search
for
Updated Jul 14, 2008 by api.jfisher
Labels: Phase-Deploy, Featured
GettingStarted  
How to configure your environment to use this library.

Introduction

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

Details

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


Comment by marypthomas88, Jun 03, 2009

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

Comment by jspatrick, Jun 08, 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 rkimbrell1449, 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.yuan, Aug 19, 2009

I also have the problem that rkimbrell1449 discribed

Comment by aneeshvkulkarni, 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.syrup, Aug 30, 2009

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

Please help us out...

Comment by catalyst7193, Sep 01, 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 EyalWiener, Sep 02, 2009

is there a solution for this? ^

Comment by tokutsu.jsk, Sep 07, 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 mototopad, Nov 04, 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.sahay, 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.sahay, 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.riversdale, Nov 29, 2009

Thank you aditya.sahay for the solution

Comment by frantic.naturalist, Dec 01, 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 mahiccc, Dec 11, 2009

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

Comment by ericpot, 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 lifeonmars.config, 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 nickhatch77, 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.


Sign in to add a comment