Reputation: 63
i keep getting the following when i run my program.
look_date = "01-02-2018"
cur.execute("SELECT item_id FROM hirers WHERE start_date=?,"
(str(look_date),))
-----------------------------------------------------------------
TypeError: 'str' object is not callable
Upvotes: 1
Views: 438
Reputation: 393
You can modify your code like this:
cur.execute("SELECT item_id FROM hirers WHERE start_date=?,"
((look_date,))
Upvotes: 0
Reputation: 3279
You have probably overwritten str
with a variable named str
, presumably another string.
Upvotes: 4