|
FAQ
Frequently asked questions and troubleshooting
FAQWill you support XXX?We're building on top of gdata-python-client, so if you don't see it supported there, we won't be supporting it in the foreseeable future. If you want a service that isn't supported by gdata-python-client, check their issue tracker for a request to support said service. If the issue exists, star it. If not, submit a new issue asking for them to support it. To request a feature for a service that we do support, file an issue on our issue tracker, following the same steps as above. How do I use the most recent version? / How do I run the code from the repository or trunk?The svn repository always has the most recent patches already applied, though it may also have new and exciting bugs. If you're not familiar with subversion, you may want to read up on it here.
Provided Python can find the gdata libraries, that's it. Isn't Python great? How do I install a newer version of gdata?Note: After following the instructions below, you should probably re-run any recent commands with --force-auth to ensure you're not using an outdated data model for the access tokens. You can also just remove the stored tokens, typically stored in ~/.local/share/googlecl/ All systemsGrab the latest version from the gdata homepage and follow the install instructions in the download. Try to remove the previous version that you have installed (if any). If you've upgraded and an earlier version seems to be lurking, see the troubleshooting section. Debian/UbuntuDebian/Ubuntu users can use their package manager to remove the old version installed: sudo dpkg -r python-gdata You may also be able to install the 2.0.8 deb file from the upcoming Ubuntu release: sudo dpkg -i https://launchpad.net/ubuntu/+archive/primary/+files/python-gdata_2.0.8-1.1_all.deb How do I apply patches?If you're as impatient as I am (not recommended), and on some flavor of Linux, try this: $ cd /path/to/python/libraries $ sudo patch -p0 -i /path/to/patch_file I really recommend reading a proper tutorial on the patch command first, though. How about this one? The path used in the cd command depends on your operating system and how GoogleCL was installed. For me (Ubuntu 9.10, using setup.py) it is /usr/local/lib/python2.6/dist-packages For Windows, you need to download a patch tool. You could also check out the svn repository by downloading an svn tool (try TortoiseSVN) and following the instructions here. The repository will have all patches from issues marked "fixed", but has the potential to be more unstable than the releases in the Downloads section. How do I uninstall GoogleCL?Why would I tell you that? :P Installing from source with python setup.py install means you probably need to remove files by hand. This provides some helpful instructions on how to do that. If you used the .deb, try sudo dpkg -r /path/to/deb_file. Replacing the -r with -P will also remove configuration files. Why isn't GoogleCL showing up in my "Authorized websites" list?This process apparently takes a while for installed applications. If nothing has shown up after 3 hours, please file an issue. How do I make calendar events with numerical titles?Add single quotes and double quotes around the name. For example: $ google calendar add '"12345"' How do I convert new-version documents to work with GoogleCL?The client libraries still have a few issues with the new document version that Google just rolled out. Here's how to convert those pesky docs using the version of GoogleCL in the repository (or, if I haven't updated this yet, whatever version is after 0.9.8)
Why can't I upload XXX to Docs?For all users, the version of gdata that you are using limits the types of documents you can upload. The list of extension: MIME content types are given below. gdata-1.2.4:
As of gdata-2.0.10, the following were added:
TroubleshootingImportError: no module named gdata.xxx.xxxYou either (1) do not have gdata installed, or (2) the gdata location isn't known by Python. To solve (1), follow the instructions given above on installing newer versions of gdata. To solve (2), if you know the gdata library is installed, you can set the PYTHONPATH environment variable to include the library's location. Known issues with gdata 1.2.4The latest version of the gdata python client that comes with Ubuntu < 10.10 (Maverick Meerkat) is 1.2.4, which causes the following known problems:
Other flavors of GNU/Linux may have outdated versions of python-gdata in their package managers, and experience similar problems. no attribute 'SetOAuthInputParameters'You need a later version of the gdata python library. The earliest version we tested with was 1.2.4. "ValueError: Invalid resource id" when using DocsUpgrading to gdata 2.0.12 seems to fix this. It has been seen in versions as late as 2.0.2. Timestamp too far from current timeIt's very likely that your system clock is out of sync with reality. Your best option is probably to sync with a time server. I recommend Googling around for the way to do this for your system, but the following tips MAY help. This issue was originally tracked by Issue 55 . POSIX systems and their ilk(almost everything but Windows) You can sync from the command line with sudo ntpdate -s ntp.time.ca with the following caveats:
If your system clock is always off when you boot up, your hardware clock is probably off and your OS isn't copying the (now correct) system clock to it. You can use sudo hwclock --systohc to set the hardware clock off the system clock, but READ THE MANUAL. Use --utc as appropriate. WindowsThese instructions are written for XP, but the steps should be very similar for all versions of Windows. Won't work from behind a proxyThe short answer seems to be "Make sure http:// and https:// are included in your proxy settings." Using just myproxy:portnumber may work for other programs, but gdata requires the protocol as well. You may want to check out these steps, which claim to be generic to the gdata-api. If you're seeing a stack trace ending in File "/usr/lib/python2.6/site-packages/atom/http.py", line 240, in _prepare_connection
p_sock.connect((proxy_url.host, int(proxy_url.port)))
File "<string>", line 1, in connect
TypeError: coercing to Unicode: need string or buffer, NoneType foundupgrading to gdata-python-client 2.0.10 works for most or all users. Issue 44 and Issue 220 tracked these issues Invalid literal for int() with base 10If you have your proxy settings defined in the style user:password@host:port you are probably seeing a stack trace ending in: File "/usr/local/lib/python2.6/dist-packages/atom/http.py", line 278, in _prepare_connection
return httplib.HTTPConnection(proxy_url.host, int(proxy_url.port))
ValueError: invalid literal for int() with base 10: 'password@host'You need to remove the username and password information from the http_proxy and https_proxy environment variables and put them into proxy_username and proxy_password. There is a patch to gdata-python-client to allow proxy authentication info in http_proxy and https_proxy here, the gdata issue is here. Issue 117 originally tracked this issue. GoogleCL behaves as if an earlier version of gdata is installedIf you have installed version 2.0.x but are still getting bugs/issues tied to earlier versions of gdata, the older version may still be lurking on your machine. Ubuntu/Debian users can use $ dpkg --list | grep gdata ... snipped ... ii python-gdata 1.2.4-0ubuntu2 Google Data Python client library If you see that, then an early version (1.2.4, in fact) is still installed. You can get rid of it with dpkg -r python-gdata Also check the directories in your PYTHONPATH: $ echo $PYTHONPATH :/usr/local/lib/python2.6/site-packages:/usr/local/lib/python2.6/dist-packages $ ls /usr/local/lib/python2.6/site-packages gdata* If PYTHONPATH is not set for you, or its directories do not contain the new gdata, set it to point at the directory where your newer version of gdata resides (export PYTHONPATH=$PYTHONPATH:/path/to/directory) After successfully removing the old version of gdata, you'll probably have to get new authorization tokens. You can force re-authentication by adding --force-auth to a command, which will discard the old token upon successfully authenticating. Calendar adds events at the wrong timeThis is probably because you have not set up a time zone for your calendar. At the Calendar home page, in the panel of calendars to the left, click on the arrow to the right of the calendar name. Go to Calendar Settings, and change the setting under Calendar Time Zone. |
I get the following error on two separate Ubuntu 10.04 systems. Python is version 2.6, and the gdata-python-client is the latest version. I followed all install directions:
Downloading documents is not supported for gdata-python-client < 2.0
Likewise, I can't edit either.
Is it possible to use Jython?
On my OS 10.6 Mac I am able to list my docs from my Google Apps for domains account, but when I try to edit them I get an error that ends in a 302 The document has moved message.
Python 2.6, google 0.9.7, gdata-2.0.10
Please provide a way to uninstall this tool elegantly. It has bugs, and I want to get rid of it. Your comment about uninstalling is simply not professional. I expect more from Google.
I would like to have found a FAQ entry regarding how to authenticate user accounts which use non-Google email addresses. (A fix would be even better, of course!)
I eventually dug a workaround up from a comment on a forum post with a non-obvious name. If there's an easier way to do this, that would make for even better FAQ material.
I'm commenting here partly in case others come looking.
I wrote the workaround up on my blog: http://antb.me/b146
The original comment from which it was derived: http://code.google.com/p/googlecl/issues/detail?id=213#c4