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


Groups > comp.lang.python > #48064 > unrolled thread

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

Started byAndreas Perstinger <andipersti@gmail.com>
First post2013-06-14 07:48 +0200
Last post2013-06-14 07:48 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

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

FromAndreas Perstinger <andipersti@gmail.com>
Date2013-06-14 07:48 +0200
SubjectRe: Having a hard time to 'get' bing api search results
Message-ID<mailman.3252.1371188940.3114.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web