couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nitin Borwankar <ni...@borwankar.com>
Subject Re: Understanding couchdb error messages
Date Wed, 26 Aug 2009 05:35:39 GMT
Hadley,

Also you need semicolons at line ends - your Ruby is showing ( :-) ).
For small one-liners this may not bite you but in general safer to add ";".

Nitin

37% of all statistics are made up on the spot
-------------------------------------------------------------------------------------
Nitin Borwankar
nborwankar@gmail.com


On Tue, Aug 25, 2009 at 12:23 PM, hadley wickham <h.wickham@gmail.com>wrote:

> Oh thanks!  I've been programming too much in languages with implicit
> returns.
>
> Hadley
>
> On Tue, Aug 25, 2009 at 2:21 PM, Paul Davis<paul.joseph.davis@gmail.com>
> wrote:
> > Doh!
> >
> > Missed it the first time through. You need "return sum(values);" No
> > return means it returns undefined.
> >
> > HTH,
> > Paul Davis
> >
> > On Tue, Aug 25, 2009 at 3:18 PM, hadley wickham<h.wickham@gmail.com>
> wrote:
> >>> The important bit:
> >>>
> >>> <<"Cannot encode 'undefined' value as JSON">>
> >>>
> >>> Means we're missing something in the view server, but the underlying
> >>> cause is that you're accessing a JavaScript member that doesn't exist.
> >>> Something like:
> >>>
> >>> var f = {"stuff": "here"};
> >>> emit(f.not_an_member, null);
> >>>
> >>> Both of your maps look all right though. Is that all there is, or is
> >>> there something else that wasn't pasted?
> >>
> >> That's all there is.  The documents all look something like this:
> >>
> >> {"issue": 2, "type": "article", "keywords": ["distribution theory"],
> >> "pages": [135, 143], "id_entity": 1000022934, "year": 1922, "journal":
> >> "Transactions of the American Mathematical Society", "authors":
> >> ["Coolidge, J. L."], "title": "The Gaussian law of error for any
> >> number of variables", "volume": 24, "id_title": 260229}
> >>
> >> Hadley
> >>
> >>
> >>
> >> --
> >> http://had.co.nz/
> >>
> >
>
>
>
> --
> http://had.co.nz/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message