Tag Archive | "python"

Importing a List with BulkLoader

Friday, June 18, 2010

2 Comments

The latest bulkloader script (api version 1.3.4) does a much better job of exporting data when you auto generate a .yaml file. However it doesn’t handle the re-import of lists by default (it just treats them as strings). You can add an inline lambda function to the .yaml file to fix this. This handles lists […]

Continue reading...

How to Delete an Index in an AppEngine Datastore

Sunday, April 18, 2010

Comments Off on How to Delete an Index in an AppEngine Datastore

If using Python, you can delete an index by first removing the entry in your index.yaml file, and then updating your site. Then you must issue this command: appcfg.py vacuum_indexes myapp/ With Django (what I am using), you use this command: manage.py vacuum_indexes What is nice about the process is that, for each index that […]

Continue reading...

Google AppEngine: appcfg.py update check failed

Tuesday, April 13, 2010

Comments Off on Google AppEngine: appcfg.py update check failed

I started getting this error in Windows when running ‘manage runserver’ in django on Google AppEngine: appcfg.py update check failed: EOF occurred in violation of protocol This error is related to not having the SSL module for python installed. The easy fix is to install it by running “easy_install ssl” from the command prompt. However, […]

Continue reading...

Solving “InvalidSenderError: Unauthorized sender” in AppEngine

Monday, March 8, 2010

10 Comments

You might get this message in Google AppEngine when sending an email message and specifying a custom from address. To get it to work you must add the address as a developer for your application (or use the email address you signed up with). Steps to Add a Developer Email Address: Log in to your […]

Continue reading...

UrlEncode in Python

Tuesday, November 3, 2009

2 Comments

To urlencode a querystring or form data in python you can use the urllib module: use urllib # you have to pass in a dictionary print urllib.urlencode({'id':'100', 'name':'john smith'}) # then you get 'id=100&name=john+smith' Urlencoding Unicode and UTF8 Values #this works fine print urllib.urlencode({name:'José'}) #you have to be careful with unicode strings # this will […]

Continue reading...