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


Groups > comp.lang.python > #48064

Re: Having a hard time to 'get' bing api search results

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <andipersti@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'column': 0.07; 'json': 0.07; "subject:' ": 0.07; 'valueerror:': 0.09; 'archive': 0.14; '(char': 0.16; 'andreas': 0.16; 'bye,': 0.16; 'expecting': 0.16; 'obj,': 0.16; 'subject:search': 0.16; 'thread,': 0.16; 'wrote:': 0.18; 'url:view': 0.20; '>>>': 0.22; 'import': 0.22; 'issue.': 0.22; 'load': 0.23; 'header:User-Agent:1': 0.23; 'error': 0.23; "aren't": 0.24; 'either.': 0.24; 'parse': 0.24; 'tells': 0.24; "i've": 0.25; 'skip:" 40': 0.26; 'post': 0.26; 'skip:_ 20': 0.27; 'header:In-Reply-To:1': 0.27; 'external': 0.29; 'kevin': 0.30; "i'm": 0.30; 'lines': 0.31; 'you?': 0.31; '"",': 0.31; 'loads': 0.31; 'post.': 0.31; 'file': 0.32; 'another': 0.32; 'everyone': 0.33; '(most': 0.33; 'beginning': 0.33; 'subject:time': 0.33; 'message.': 0.35; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'skip:j 20': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'list': 0.37; 'received:10': 0.37; 'message- id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'mailing': 0.39; 'read': 0.60; 'name:': 0.61; 'first': 0.61; 'e-mails': 0.65; 'due': 0.66; 'subject:get': 0.81; 'subject:results': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=7wiLusVvZZImIc/vy5xoe/MlkZeaKHwTtrM9Tsu3RFE=; b=pU5uqb6iKKiEtthjqWOsBwdKTv4wbhva4Qr5xx9ni0jzM06G1yQQ5nKwPPg6yRKanQ vy6j2oSoCrATVdrAqPf/fJnsgVLMqs7xS5y1XxwgsJHZLkxzbVrlMWMsot/Xv7e5sj2X /Gq0/hk/DQkSnwqhjkUqQNWlUSSE5IOvfPBY/VtZo3J6AxGXq6t4JNDJ4VF5AKBX+wYc cPNpeJ0QKsvP8jg8jyokDLSYaYMF1sedhgHk8reKo51j8Iq8Gjz7Na6lA5KoYqEUvqQ9 iu5rx16gik0vWzHf/9ucdwBsmrtQPi6kQHjHIjoDRJc32ZjU62vrpYEANT8powTeUBrP QxPw==
X-Received by 10.14.182.132 with SMTP id o4mr940775eem.94.1371188932336; Thu, 13 Jun 2013 22:48:52 -0700 (PDT)
Date Fri, 14 Jun 2013 07:48:50 +0200
From Andreas Perstinger <andipersti@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6
MIME-Version 1.0
To python-list@python.org
Subject Re: Having a hard time to 'get' bing api search results
References <CAJ=2b05Vooh1V3ZOijtS0Y4AwKLSQdbiRhOKkqwzKi_dJ_3m6w@mail.gmail.com> <CAJ=2b06XgZjYs=vDayBTKTJsASeqJZkXiVQfvucqwBsrQAkGnw@mail.gmail.com> <CCED9463-4567-4774-A3BD-D7867D3A275E@studiosola.com> <CAJ=2b07JcOA4ZyOUynv98jd3Tedy12bkE=tGw-MdXUNz6Semww@mail.gmail.com> <E9C31674-4756-47E6-B45D-28A25A7EC6F5@studiosola.com> <CAJ=2b06ECJJYAb_3Q2A+YKCa_VR9-PCg0zeRO14eStdMkFf94A@mail.gmail.com>
In-Reply-To <CAJ=2b06ECJJYAb_3Q2A+YKCa_VR9-PCg0zeRO14eStdMkFf94A@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3252.1371188940.3114.python-list@python.org> (permalink)
Lines 38
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1371188940 news.xs4all.nl 15874 [2001:888:2000:d::a6]:33143
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:48064

Show key headers only | View raw


On 14.06.2013 03:00, Yves S. Garret wrote:
> Thanks again Kevin.  I'm deviating from the original thread,
> but I've got another issue.  When I try to load the json file
> and then parse it, this is the error that I get:
> http://bin.cakephp.org/view/1329549559

1) Please don't top post. Put your answer after the parts you are 
replying to.

2) Is Kevin sending his e-mails only to you? I don't get them and they 
aren't in the mailing list archive either.

3) Please copy the traceback you get into your message. Otherwise you 
will reduce the amount of people who are willing to help you because not 
everyone likes to go to an external website just to read them.
So here's it:

 >>> import json
 >>> import pprint
 >>> json_data = open('temp.json')
 >>> data = json.load(json_data)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/local/lib/python2.7/json/__init__.py", line 290, in load
     **kw)
   File "/usr/local/lib/python2.7/json/__init__.py", line 338, in loads
     return _default_decoder.decode(s)
   File "/usr/local/lib/python2.7/json/decoder.py", line 365, in decode
     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
   File "/usr/local/lib/python2.7/json/decoder.py", line 381, in raw_decode
     obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 2 column 1 (char 2)

4) The error message tells you that json.load() can't parse your file 
due to an error at the beginning of line 2. So can you please post the 
first lines of your file?

Bye, Andreas

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


Thread

Re: Having a hard time to 'get' bing api search results Andreas Perstinger <andipersti@gmail.com> - 2013-06-14 07:48 +0200

csiph-web