{"action":"created","issue":{"url":"https://api.github.com/repos/coleifer/peewee/issues/520","labels_url":"https://api.github.com/repos/coleifer/peewee/issues/520/labels{/name}","comments_url":"https://api.github.com/repos/coleifer/peewee/issues/520/comments","events_url":"https://api.github.com/repos/coleifer/peewee/issues/520/events","html_url":"https://github.com/coleifer/peewee/issues/520","id":56436201,"number":520,"title":"Not sure why: OperationalError: near \"AS\": syntax error","user":{"login":"kristofer","id":17994,"avatar_url":"https://avatars.githubusercontent.com/u/17994?v=3","gravatar_id":"","url":"https://api.github.com/users/kristofer","html_url":"https://github.com/kristofer","followers_url":"https://api.github.com/users/kristofer/followers","following_url":"https://api.github.com/users/kristofer/following{/other_user}","gists_url":"https://api.github.com/users/kristofer/gists{/gist_id}","starred_url":"https://api.github.com/users/kristofer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristofer/subscriptions","organizations_url":"https://api.github.com/users/kristofer/orgs","repos_url":"https://api.github.com/users/kristofer/repos","events_url":"https://api.github.com/users/kristofer/events{/privacy}","received_events_url":"https://api.github.com/users/kristofer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-03T20:59:22Z","updated_at":"2015-02-03T23:29:38Z","closed_at":"2015-02-03T22:10:43Z","body":"\r\nSo I am getting a syntax error deep inside of peewee. \r\nI'm trying to get the \"encrypted-flask-aws\" app, pretty much unmodified,\r\nwhen I try to do a GET on the root of the app,\r\nI get:\r\n```\r\n...venv/lib/python2.7/site-packages/peewee.py\", line 2855, in execute_sql\r\n    cursor.execute(sql, params or ())\r\nOperationalError: near \"AS\": syntax error\r\n```\r\n\r\nJust before this error, it run this... \r\n```\r\n    return render_template('index.html', files=files, breads=breads, path=path)\r\n```\r\nand just before that when I \"print files\", I have\r\n```\r\n<class '__main__.File'> SELECT \"t1\".\"id\", \"t1\".\"filename\", \"t1\".\"created_date\", \"t1\".\"encrypted\", \"t1\".\"folder\", \"t1\".\"parent\" FROM \"file\" AS t1 WHERE (\"t1\".\"parent\" = ?) ORDER BY (\"file\" AS t1, ?, ?), (\"file\" AS t1, ?) [u'/', 'folder', 'DESC', 'filename']\r\n```\r\n\r\nAnd that SQL is being generated for me by Peewee, as it tries to query my sqlite.\r\n\r\nany ideas??\r\n"},"comment":{"url":"https://api.github.com/repos/coleifer/peewee/issues/comments/72759243","html_url":"https://github.com/coleifer/peewee/issues/520#issuecomment-72759243","issue_url":"https://api.github.com/repos/coleifer/peewee/issues/520","id":72759243,"user":{"login":"kristofer","id":17994,"avatar_url":"https://avatars.githubusercontent.com/u/17994?v=3","gravatar_id":"","url":"https://api.github.com/users/kristofer","html_url":"https://github.com/kristofer","followers_url":"https://api.github.com/users/kristofer/followers","following_url":"https://api.github.com/users/kristofer/following{/other_user}","gists_url":"https://api.github.com/users/kristofer/gists{/gist_id}","starred_url":"https://api.github.com/users/kristofer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristofer/subscriptions","organizations_url":"https://api.github.com/users/kristofer/orgs","repos_url":"https://api.github.com/users/kristofer/repos","events_url":"https://api.github.com/users/kristofer/events{/privacy}","received_events_url":"https://api.github.com/users/kristofer/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T23:29:38Z","updated_at":"2015-02-03T23:29:38Z","body":"yep, that's handy. Thanks again."}}