CouchDB can support views in any language but only ships with a Javascript view server enabled by default. As noted, you can also enable Erlang views (though I urge caution, it has no sandbox, so a map function may call file:delete(Path), etc).
There is at least one Python view server out there but it is additional software you need to install and configure. B. On 1 September 2011 00:10, Ben Hunter <[email protected]> wrote: > Thanks for getting back. > > I have to assume the code's been tested pretty rigorously, as it's straight > from an O'Reilly book. I know that doesn't mean the code is perfect, but > surely they wouldn't say CouchDB will do something it can't. Or would it? > > At any rate, shortly after posting I found this post from last year: > https://mail-archives.apache.org/mod_mbox/couchdb-user/201007.mbox/%[email protected]%3E > > that advises I pop this in the local.ini: > [query_servers] > python = /usr/local/bin/couchpy > > I'll try it when I get home. > > On Wed, Aug 31, 2011 at 4:04 PM, Jens Alfke <[email protected]> wrote: > >> >> On Aug 31, 2011, at 3:29 PM, Ben Hunter wrote: >> >> I am merely running through some of the exercises in 'Mining the Social >> Web'. All the programs that store data to CouchDB work fine, but when the >> couchdb module is used to create a view, it throws 'Server error 500 >> unknown >> query language python’. >> >> As far as I know, CouchDB doesn’t support writing view functions in Python, >> only JavaScript and Erlang. Unless there’s an external view server that >> implements this; but that’s not a standard part of CouchDB, rather something >> extra you’d have to install. Maybe double-check the installation/setup >> instructions in the book? >> >> —Jens >> >> >
