coleifer/flask-peewee — Issue #12: admin fails on export json
Author: davidthewatson
Created: 2011-12-14 23:57:21+00:00
State: open

This occurs in the example app after selecting the user table and clicking export json with no changes in the UI:

Debugging middleware caught exception in streamed response at a point where response headers were already sent.
Traceback (most recent call last):
File "/home/watson/flask-peewee/flask_peewee/admin.py", line 466, in generate
for obj in prepared_query:
File "build/bdist.linux-x86_64/egg/peewee.py", line 1092, in __iter__
return self.execute()
File "build/bdist.linux-x86_64/egg/peewee.py", line 1082, in execute
self._qr = QueryResultWrapper(self.model, self.raw_execute())
File "build/bdist.linux-x86_64/egg/peewee.py", line 824, in raw_execute
query, params = self.sql()
File "build/bdist.linux-x86_64/egg/peewee.py", line 1038, in sql
parsed_query = self.parse_select_query(alias_map)
File "build/bdist.linux-x86_64/egg/peewee.py", line 1010, in parse_select_query
func, col, col_alias = col
ValueError: need more than 2 values to unpack

The same thing occurred in the app I built working from the getting started doc.