Path: csiph.com!au2pb.net!feeder.erje.net!2.us.feeder.erje.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!gordon From: John Gordon Newsgroups: comp.lang.python Subject: Re: error reading api with urllib Date: Wed, 16 Dec 2015 22:12:02 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 19 Message-ID: References: <9aa21642-765b-4666-8c66-a6dab9928c37@googlegroups.com> NNTP-Posting-Host: panix2.panix.com X-Trace: reader1.panix.com 1450303922 23108 166.84.1.2 (16 Dec 2015 22:12:02 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Wed, 16 Dec 2015 22:12:02 +0000 (UTC) User-Agent: nn/6.7.3 Xref: csiph.com comp.lang.python:100538 In <9aa21642-765b-4666-8c66-a6dab9928c37@googlegroups.com> simian336@gmail.com writes: > Bad Request > b'' That probably means you aren't using one of the recognized methods (i.e. GET, POST, etc.) It doesn't look like you are specifying one of these methods on your Request object. Try doing that. (It works in your browser because it defaults to GET automatically.) -- John Gordon A is for Amy, who fell down the stairs gordon@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies"