TypeError: 'dict' object does not support indexing thrown on second instance of this query
问题 So I am building a query based on user input in flask with this code: if empty_indic_form.validate_on_submit(): query='select name, year, value, display_name from literal inner join ent on ent_id=ent.id where display_name in (' for i in indic_form.indicators.data: query=query+'\''+i+'\',' query=query[:-1]+') ' query=query+'and name in (' for c in order_c: query=query+c+',' query=query[:-1]+')' data_return=db.engine.execute(query).fetchall() I have confirmed that query looks like what it is