Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.037 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'mrab': 0.05; 'here?': 0.09; 'req': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'posted,': 0.16; 'subject:post': 0.16; 'timeout)': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'aug': 0.22; 'skip:" 30': 0.26; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; "skip:' 10": 0.31; '13,': 0.31; 'file': 0.32; 'figure': 0.32; 'open': 0.33; '(most': 0.33; 'actual': 0.34; 'skip:_ 10': 0.34; 'subject:with': 0.35; 'skip:u 20': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'data,': 0.36; 'error.': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; "you've": 0.63; 'more': 0.64; 'future,': 0.83; 'mistake': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=VeGHKnzAGUrL6U0ZljKFR9aIvGCTMqBZWXWhRb77QOA=; b=r8nmFUWUsIB1iJDPN7B11U3WPuq5K4lXVNjQbYz0TJUuXE3/gyFleblGJikbrkuPiq UqpwKERAhu9i5EqSWbxpyLXkrs48NZB0usW6EG7QBdrOzp19WxXd2CujB9TzDdiAxTUl 08wVrIew8dp//HRB9s24sAw+/AjUxKFJZPq88jIzHj5Fut3IIQ8XtVwOfB8hbZBg3xPc K3mVYRXDl//2psfpt/tJueqc4Zruejo26xQHuPZtaPqvsR9rzvvDIdixebZazE3V+QH8 yIy59W4rTt8nQhxE8JMMKhb2+DTRMK+OBzEwImdJbPdKMXj7jCP46zexyCy/9zM/G+nQ gf2Q== MIME-Version: 1.0 X-Received: by 10.58.249.236 with SMTP id yx12mr235647vec.25.1375835304546; Tue, 06 Aug 2013 17:28:24 -0700 (PDT) In-Reply-To: <2e3c176d-6cb9-42f9-91a9-6bf0832a69cb@googlegroups.com> References: <2e3c176d-6cb9-42f9-91a9-6bf0832a69cb@googlegroups.com> Date: Wed, 7 Aug 2013 01:28:24 +0100 Subject: Re: HTTP post with urllib2 From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375835312 news.xs4all.nl 15960 [2001:888:2000:d::a6]:37773 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52094 On Tue, Aug 6, 2013 at 11:52 PM, cerr wrote: > ./post.py > Traceback (most recent call last): > File "./post.py", line 13, in > response = urllib2.urlopen(req, 120) > File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen > return _opener.open(url, data, timeout) > File "/usr/lib/python2.7/urllib2.py", line 398, in open > req = meth(req) > File "/usr/lib/python2.7/urllib2.py", line 1116, in do_request_ > 'Content-length', '%d' % len(data)) > > > I don't get it, what's going on here? > You've given a traceback without the actual error. MRAB happened to figure out the mistake just from what you posted, but in future, do try to copy a bit more down :) ChrisA