I also ran into this problem, after selectively upgrading calendarserver only. If it helps, I narrowed the fix on my system to upgrading python-sqlparse from version 0.1.13-2 (the version I had installed when encountering the error) to 0.2.4-1 (the current version in testing and unstable). It's certainly possible that some intermediate version of python-sqlparse might be sufficient to fix this problem, but I haven't looked into it.
-- Joseph Spiros jos...@josephspiros.com