Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 86072 invoked from network); 6 Apr 2010 18:18:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Apr 2010 18:18:05 -0000 Received: (qmail 91994 invoked by uid 500); 6 Apr 2010 18:18:04 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 91953 invoked by uid 500); 6 Apr 2010 18:18:04 -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 91945 invoked by uid 99); 6 Apr 2010 18:18:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 18:18:04 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mikhail.sobolev@gmail.com designates 209.85.220.220 as permitted sender) Received: from [209.85.220.220] (HELO mail-fx0-f220.google.com) (209.85.220.220) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 18:17:56 +0000 Received: by fxm20 with SMTP id 20so230496fxm.32 for ; Tue, 06 Apr 2010 11:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=99jzVcPZ9FtuBX9nhTq8Vh6g1x02nQt1PCp+wx8Wl1c=; b=BJzDCHvAsx/magubi08syjsjr3e96h9bxVO6HbGRhT3AoYlKufXk6ZF+U4zXeI5z6s 8foyhEAh1PF9T7t1h2VIO10+Tbz6ZgJ4INFSmiIPf+ZNktitjmJVJIH5DqV386Jeulvk z/9hAre2HhLCZnkLT3m7yB1aCy0reOtdBnp94= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Aca3z3WnmoeKsonPOdCsmyttnnzPxjoJLvBXdru9o1/wGfaqOngbiqYMlqJBoIbqh3 3xrvlW/hDkdGcymLmBlDG56VlVeisrboJe3XVF61uOe0y02nQ7pcrFTYUr4jSY1uj3UV T5nsXmiHno8cip/BQSI73IH1tlVIwzjpPqKU0= MIME-Version: 1.0 Received: by 10.223.110.83 with HTTP; Tue, 6 Apr 2010 11:17:35 -0700 (PDT) In-Reply-To: <8FEEFF39-F299-4F8A-BE21-49648C6E3874@apache.org> References: <8FEEFF39-F299-4F8A-BE21-49648C6E3874@apache.org> Date: Tue, 6 Apr 2010 21:17:35 +0300 Received: by 10.223.6.81 with SMTP id 17mr7731035fay.79.1270577856052; Tue, 06 Apr 2010 11:17:36 -0700 (PDT) Message-ID: Subject: Re: couchdb.http.PreconditionFailed: ('missing_stub', ...) From: Mikhail Sobolev To: user@couchdb.apache.org Content-Type: multipart/mixed; boundary=00151747918ac4fee404839575b9 X-Virus-Checked: Checked by ClamAV on apache.org --00151747918ac4fee404839575b9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Jan, On Tue, Apr 6, 2010 at 5:21 PM, Jan Lehnardt wrote: > On 5 Apr 2010, at 22:58, Mikhail Sobolev wrote: >> I just upgraded to couchdb 0.11 and my application fails with >> =C2=A0 =C2=A0couchdb.http.PreconditionFailed: ('missing_stub', ...) >> >> What could lead to such an error? > > Some code :D =E2=80=94 What are you trying to do? :) This idea crossed my mind :) Essentially, I'm doing the following: 1. create a document with props 2. save it 3. add an attanchment 4. update some document props related to the attachment 5. save the updated document 3-5 are repeated several times. At 3 & 5, the _rev is updated properly. At 3 with the previous version of couchdb (0.10.1) a simple 'trick" of adding/updating _attachment ("filename": { "stub": true}) was working just fine. With the new version it bails out with the message in the subject. The attached file shows what I'm I doing the 'head' of couchdb-python module. (The previous version did not have 'revpos=3Ddoc.rev'.) > My bet is on you try updating or deleting a document without passing in a= valid _rev. The code used to work. -- Misha --00151747918ac4fee404839575b9 Content-Type: text/x-python-script; charset=US-ASCII; name="fap.py" Content-Disposition: attachment; filename="fap.py" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g7p182kr0 IyEgL3Vzci9iaW4vcHl0aG9uIC10dAoKZnJvbSBjb3VjaGRiIGltcG9ydCBTZXJ2ZXIsIERvY3Vt ZW50CgppbXBvcnQgbWQ1LCBzaGEKCmRlZiBtYWluKCk6CiAgICAiIiJmaWxlcyBhbmQgcHJvcHMi IiIKCiAgICBzZXJ2ZXIgPSBTZXJ2ZXIoKQoKICAgIGRiID0gc2VydmVyLmNyZWF0ZSgnZmFwJykK CiAgICBkb2NfaWQgPSAndGVzdGl0JwoKICAgIGRvYyA9IERvY3VtZW50KG15PSdmYW5jeScsIHBy b3BzPSdoZXJlJywgaW5mbz17fSkKCiAgICBkYltkb2NfaWRdID0gZG9jICAgICAgIyBfcmV2IGlz IGNvcnJlY3QKCiAgICBmb3IgZmlsZW5hbWUgaW4gWyAnMScsICcyJywgJzMnLCAnNCcsICc1JyBd OgogICAgICAgIGZkID0gb3BlbihmaWxlbmFtZSwgJ3JiJykKICAgICAgICBkYXRhID0gZmQucmVh ZCgpCiAgICAgICAgZmQuY2xvc2UoKQoKICAgICAgICBkYi5wdXRfYXR0YWNobWVudChkb2MsIGRh dGEsIGZpbGVuYW1lLCAnYXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtJykKCiAgICAgICAgaWYgJ19h dHRhY2htZW50cycgbm90IGluIGRvYzoKICAgICAgICAgICAgZG9jWydfYXR0YWNobWVudHMnXSA9 IHt9CgogICAgICAgIGRvY1snX2F0dGFjaG1lbnRzJ11bZmlsZW5hbWVdID0gZGljdChzdHViPVRy dWUsIHJldnBvcz1kb2MucmV2KQoKICAgICAgICBkb2NbJ2luZm8nXVtmaWxlbmFtZV0gPSBkaWN0 KAogICAgICAgICAgICBtZDU9bWQ1Lm1kNShkYXRhKS5oZXhkaWdlc3QoKSwKICAgICAgICAgICAg c2hhMT1zaGEuc2hhKGRhdGEpLmhleGRpZ2VzdCgpCiAgICAgICAgKQoKICAgICAgICBkYltkb2Nf aWRdID0gZG9jCgppZiBfX25hbWVfXyA9PSAnX19tYWluX18nOgogICAgbWFpbigpCg== --00151747918ac4fee404839575b9--