ha! works! It was this couchpy not view.py thing. I was suggested by ms vista config where the file is pointed.
Thanks! 2009/1/20 Jan Lehnardt <[email protected]> > > On 20 Jan 2009, at 14:34, Jeff Hinrichs - DM&T wrote: > > On Tue, Jan 20, 2009 at 2:51 AM, eF <[email protected]> wrote: >> >>> actually I followed the post You mentioned, and while I didnt find >>> local.ini >>> I changed couch.ini.. so.. how to generate local.ini (where it come >>> from?) >>> >>> That depends on what platform you are installing on. Building from >> source on Ubuntu 8.x it is just there. When I installed on FreeBSD 7 >> from ports, I had to make my own. It is just a text file that doesn't >> change when you update, where as the couch.ini file may change. You >> need to specify both when starting couchdb >> -c \"/usr/local/etc/couchdb/default.ini\" -c >> \"/usr/local/etc/couchdb/local.ini\" >> > > > It actually depends on the CouchDB version :) the 0.8 series ships with > couch.ini, the 0.9 series ships with default.ini and local.ini. > > Cheers > Jan > -- > > > The settings from the second config listed, override the 1st. When >> you make changes to the configuration via Futon, it modifies the last >> config file specified. >> In your cmd line. In the above it would be the local.ini >> >> so in your couch.ini (my default.ini) There is the following: >> [query_servers] >> javascript = /usr/local/bin/couchjs >> /usr/local/share/couchdb/server/main.js >> >> In your local modifications file (local.ini or the second specified), >> create a [query_servers] section like: >> [query_servers] >> python = /usr/bin/couchpy >> >> you should put the second config file in the same directory as the >> first, with the same permissions. >> (** if you are just kicking the tires, go ahead and modify the >> existing config and don't worry about the creating a second. Just >> remember it may be over written when/if you update couchdb.) >> >> Then restart couch and go to the configuration section and you should see >> query_servers >> javascript /usr/local/bin/couchjs >> /usr/local/share/couchdb/server/main.js >> python /usr/bin/couchpy >> >> Now go to Custom Query... in a database and enter the following simple >> map function >> def fun(doc): >> yield None, doc >> >> click "Run" and if it works, you are golden. >> >> Remember, couchpy is what you want to point to for the python view >> server and not view.py directly. In my installation it is installed >> in /usr/bin >> which couchpy is your friend, and when you think you have it, try to >> run it from the command line with >> /usr/bin/couchpy --help >> >> to make sure >> >> >> Have Fun! >> >> -Jeff >> >> 2009/1/19 Jeff Hinrichs - DM&T <[email protected]> >>> >>> On Mon, Jan 19, 2009 at 8:18 AM, Michal <[email protected]> wrote: >>>> >>>>> >>>>> what went wrong when I get this error: >>>>> >>>>> couchdb.client.ServerError: (500, ('error', >>>>> >>>> "{{nocatch,{map_process_error,{exit_status,0}}},\n >>>> [{couch_query_servers,readline,2},\n >>>> {couch_query_servers,read_json,1},\n >>>> {couch_query_servers,prompt,2},\n >>>> {couch_query_servers,'-start_doc_map/2-fun-0-',2},\n >>>> {lists,foreach,2},\n >>>> {couch_query_servers,start_doc_map,2},\n {couch_view,view_compute,2},\n >>>> {couch_view,update_group,1}]}")) >>>> >>>>> >>>>> I was trying to configure couchdb to use it with python. I modified >>>>> >>>> couch.ini and path points to view.py from couchdb-python. The same query >>>> works when it is written in JS (db exists and all tests are passed). The >>>> same program works on vista, on leopard if fails. >>>> >>>>> >>>>> br >>>>> michal z >>>>> >>>> >>>> view server not set up correctly. See >>>> http://mail-archives.apache.org/mod_mbox/couchd, >>>> [email protected]/200812.mbox/% >>>> [email protected]%3e< >>>> http://mail-archives.apache.org/mod_mbox/couchdb-user/200812.mbox/%[email protected]%3e >>>> > >>>> >>>> You should probably be editing your local.ini and not the couch.ini file >>>> too. >>>> >>>> -Jeff >>>> >>>> >>> >> >
