Issue: RecursionError on large select queries
Author: conqp
State: closed
Created: 2018-11-07 09:42:13

I have a terminals database with ~ 1000 records at the moment.
I use it in python programs programatically using peewee ORM models.
When I try to filter for a huge number of records, I get a recursion error:

```
>>> len(terminals)
576
>>> terminals
[('1', '1000'), <snip>]
>>> expression = False
>>> from terminallib import Terminal
>>> for tid, cid in terminals:
...     expression |= (Terminal.tid == tid) & (Terminal.customer == cid)
... 
>>> select = Terminal.select().where(expression)
>>> list(select)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 5898, in __iter__
    self.execute()
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1589, in inner
    return method(self, database, *args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1660, in execute
    return self._execute(database)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1811, in _execute
    cursor = database.execute(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 2667, in execute
    sql, params = ctx.sql(query).query()
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 2030, in __sql__
    ctx.literal(' WHERE ').sql(self._where)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1293, in __sql__
    .sql(self.rhs))
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 558, in sql
    return obj.__sql__(self)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 1283, in __sql__
    with ctx(**overrides):
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 531, in __call__
    self.state = self.state(**overrides)
  File "/usr/local/lib/python3.4/dist-packages/peewee.py", line 489, in __call__
    return State(scope, parentheses, **settings)
RuntimeError: maximum recursion depth exceeded in comparison
```
Any chances, this might get fixed?

The recursion error is because you are creating a stack whose length exceeds the stack depth set by the interpreter. Of course you can always manually extend this: https://docs.python.org/3/library/sys.html#sys.setrecursionlimit

The problem here:

```pycon
>>> expression = False
>>> from terminallib import Terminal
>>> for tid, cid in terminals:
...     expression |= (Terminal.tid == tid) & (Terminal.customer == cid)
```

So you're building up an OR-ed expression that has ~1000 terms (and each of those terms is composed of two expressions). Some SQL databases won't let you do that, so even if you increase your python limits, you'll run into limits from your database.

My opinion, in other words, is that you're doing it wrong.