元组索引超出范围错误

时间:2015-09-24 16:11:00

标签: python tuples

我正在尝试使用db_access中的SQL索引创建一个有组织的表格式,但是当我运行我的脚本时,我收到错误IndexError:tuple index超出范围。
我在db_access脚本中尝试了其他SQL语句,我得到了同样的错误。

Data.py

def get_locations_for_area(area_id):


    return do_command('select * from location where location_area = ?', [area_id])


def get_measurements_for_location(location_id):

    return do_command('select * from measurement where measurement_location = ? ', [location_id])

def get_categories_for_area(area_id):


    return do_command('select * from category_area NATURAL JOIN category WHERE area_id=?', [area_id])

我的db_access脚本

{{1}}

编辑:数据库sakila文件:http://ksuweb.kennesaw.edu/~bsetzer/4720fa15/extra/databases/measurements/measures.sqlite

0 个答案:

没有答案
相关问题