I'm running into an issue with the peewee regexp function. Queries like this work the first time I run it:
query = Table.select().where(Table.column.regexp('string'))
However, if I try to run it with a different string, I get this error: 'unicode' object has no attribute 'regexp':
query = Table.select().where(Table.column.regexp('string2'))
I usually run it twice because I need to see how specific to make the regexp string.
I've tried disconnecting/reconnecting to the db, but that doesn't help. The only thing that works is if I close ipython and restart it. Is this a memory/buffer issue? Is there a good way to get this to work? Thanks in advance.