Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 64343 invoked from network); 23 Feb 2009 02:24:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Feb 2009 02:24:00 -0000 Received: (qmail 68105 invoked by uid 500); 23 Feb 2009 02:23:58 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 68069 invoked by uid 500); 23 Feb 2009 02:23:58 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 68058 invoked by uid 99); 23 Feb 2009 02:23:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Feb 2009 18:23:58 -0800 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dundeemt@gmail.com designates 209.85.198.234 as permitted sender) Received: from [209.85.198.234] (HELO rv-out-0506.google.com) (209.85.198.234) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2009 02:23:51 +0000 Received: by rv-out-0506.google.com with SMTP id f6so1617837rvb.35 for ; Sun, 22 Feb 2009 18:23:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=+ceQhSsYbR83yePaY6vBpW87pl6bL6RUb3VFuee6Pt8=; b=qNpZ9M39tN/eor6gjeARGD9dEr9JXuhHHUVelQygOsupXoszrOKt8IT/QB5A0EE8y2 nPYnjfLguol9jEgWzw05n8qXDaaQ6W4GUA0VzESsbdKq5a7INYVuOswxwwk+PwWvBUK8 96IvIjWSbGqMZSODkxqRqldFOLkWdJFZyYlSw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; b=vRvFFkniJgDoA7L02SxXZrdmt2+sLS09JTM/4tImPLC4HCzfXK1OQNpzETR16SKbUZ t0a6qLBhhx6J8NEHyJIB+bj1USe+aRmMAdQI86hzl7lKEfFCns7Uu94vuTRJydbyDMfJ jTXVV84YY+WTDt10P9OkgqYSyWx483tlEEHCc= MIME-Version: 1.0 Received: by 10.140.164.6 with SMTP id m6mr1380279rve.86.1235355809862; Sun, 22 Feb 2009 18:23:29 -0800 (PST) Reply-To: tech@dundeemt.com In-Reply-To: References: Date: Sun, 22 Feb 2009 20:23:29 -0600 Message-ID: <5aaed53f0902221823r4bec8859xbca3569ade9fa839@mail.gmail.com> Subject: Re: Problem with python view server From: "Jeff Hinrichs - DM&T" To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Sun, Feb 22, 2009 at 12:42 PM, Simon Metson wrote: > > Hi All, > Using CouchDB 0.9.0a722639-incubating I get the following error wh= en trying to access a python view server: > > {"error":"{badmatch,{start_array,{decoder,null,37,1,38,trim}}}","reason":= "[{mochijson2,json_decode,2},\n {couch_query_servers,read_json,1},\n {couch= _query_servers,prompt,2},\n {couch_query_servers,'-map_docs/2-fun-1-',2},\n= {lists,map,2},\n {couch_query_servers,map_docs,2},\n {couch_view,view_comp= ute,2},\n {couch_view,update_group,1}]"} > > http://localhost:5984/_config/query_servers/ has: > {"python":"/Users/metson/Documents/Workspace/PlayGround/couchdb-python/bu= ild/lib/couchdb/view.py","javascript":"/Users/metson/Documents/Workspace/Pl= ayGround/couchdb/install/bin/couchjs /Users/metson/Documents/Workspace/Play= Ground/couchdb/install/share/couchdb/server/main.js"} You want to use couchpy as your view server. Assuming python-couchdb 0.5 > > which is from the latest trunk of couchdb-python, and the view is: > def mapfun(doc): yield doc You will want to yield key,values -- you would actually want something lik= e: yield None, doc > > The script is executable, and, as far as I can tell the python path is co= rrect (I can import all the libs). > Am I doing something obviously wrong? Should I update to a more recent co= uch build? > Cheers > Simon Regards, Jeff