sqlalchemy filter using in_ raise programmingerror

Viewed 21

I am trying to do a simple filter operation on a query in sqlalchemy, like this:

delete(label_pick_detail).where(label_pick_detail.c.tag.in_(set(tag_list)))

but it raise an error

pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'[POSTCOMPILE_tag_1])\' at line 1")\n']

the query is

DELETE FROM label_pick_detail WHERE label_pick_detail.tag IN (__[POSTCOMPILE_tag_1])

what should I do?

0 Answers
Related