I am currently trying to find a database to capture specific events. My request as such
SELECT * FROM events WHERE summary ILIKE E'%test%' AND start_time > '2010-10-01'
Simply put, I need a request to view the calendar events database and return something with a resume with a βtestβ in it after the start of this month.
This returns the expected results when prompted from the database command line. However, when I try to use it in my Python script with psycopg2 as such:
cursor.execute("SELECT * FROM events WHERE summary ILIKE E'%test%' AND start_time > %(begin)s ", {'begin' : datetime.datetime(2010,10,1) })
I get an error like
*** TypeError: 'dict' object does not support indexing
Doing some kind of initial Googling is similar to how I use my wildcards. I could be wrong, although I probably missed something simple that I do not see. I hope a fresh pair of eyes from the community can fix my noobility;)
python psycopg2
The Jug Oct. 15 '10 at 16:39 2010-10-15 16:39
source share