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


Groups > comp.lang.python > #48210

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

Date 2013-06-14 21:14 +0200
From Andreas Perstinger <andipersti@gmail.com>
Subject Re: Having a hard time to 'get' bing api search results
References (10 earlier) <CAJ=2b05RPywzo2o+TEtJyW7Ax1GGOz8jjToS3iV+pnsRhPcsvQ@mail.gmail.com> <CA40A1A8-2CF8-4C66-B6B7-15504E96CB32@studiosola.com> <CAJ=2b05-ZgapEDAWQph+Liqg2GnL77SFznfQ44ODvFGsQc9FKQ@mail.gmail.com> <9B89A4BB-D19A-4623-862D-402EE6856157@studiosola.com> <CAJ=2b07egk-1VUGHMNCD3WGmw=P2+noSmw=Nn4QQUQKjCrugSw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3336.1371237290.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 14.06.2013 20:19, Yves S. Garret wrote:
> This is the error that I'm getting right now.
>>>> import json
>>>> from pprint import pprint
>>>> path = '/home/azureuser/temp.json'
>>>> with open(path) as data_file:
> ...   data = json.load(data_file)
> ...
> Traceback (most recent call last):
>    File "<stdin>", line 2, 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)
>
> Thanks for your inputs Andreas.
>
> Also, this is my JSON file, I'll post again.  Since it's going to be
> messy, I'll include a link as well (users can decide what they prefer
> to read).
> http://bin.cakephp.org/view/1050217914

Ok, I've just copied the text from the site into a file and there is no 
problem loading the file.

You could try the same.

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 21:14 +0200

csiph-web