Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #52094

Re: HTTP post with urllib2

References <2e3c176d-6cb9-42f9-91a9-6bf0832a69cb@googlegroups.com>
Date 2013-08-07 01:28 +0100
Subject Re: HTTP post with urllib2
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.290.1375835312.1251.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Aug 6, 2013 at 11:52 PM, cerr <ron.eggler@gmail.com> wrote:
> ./post.py
> Traceback (most recent call last):
>   File "./post.py", line 13, in <module>
>     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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

HTTP post with urllib2 cerr <ron.eggler@gmail.com> - 2013-08-06 15:52 -0700
  Re: HTTP post with urllib2 Joel Goldstick <joel.goldstick@gmail.com> - 2013-08-06 19:08 -0400
    Re: HTTP post with urllib2 cerr <ron.eggler@gmail.com> - 2013-08-06 16:35 -0700
      Re: HTTP post with urllib2 Joel Goldstick <joel.goldstick@gmail.com> - 2013-08-06 19:48 -0400
  Re: HTTP post with urllib2 MRAB <python@mrabarnett.plus.com> - 2013-08-07 01:14 +0100
    Re: HTTP post with urllib2 cerr <ron.eggler@gmail.com> - 2013-08-07 09:20 -0700
  Re: HTTP post with urllib2 Chris Angelico <rosuav@gmail.com> - 2013-08-07 01:28 +0100

csiph-web