Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'column': 0.07; 'json': 0.07; "subject:' ": 0.07; 'valueerror:': 0.09; '(char': 0.16; 'andreas': 0.16; 'bye,': 0.16; 'expecting': 0.16; 'inputs': 0.16; 'obj,': 0.16; 'subject:search': 0.16; 'wrote:': 0.18; 'file,': 0.19; 'url:view': 0.20; 'import': 0.22; 'load': 0.23; 'header :User-Agent:1': 0.23; 'error': 0.23; 'copied': 0.24; 'decide': 0.24; 'file.': 0.24; "i've": 0.25; 'skip:" 40': 0.26; 'post': 0.26; 'skip:_ 20': 0.27; 'header:In-Reply-To:1': 0.27; "i'm": 0.30; 'getting': 0.31; '"",': 0.31; '>>>>': 0.31; 'loading': 0.31; 'loads': 0.31; 'file': 0.32; 'text': 0.33; '(most': 0.33; 'subject:time': 0.33; 'could': 0.34; 'problem': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'skip:j 20': 0.36; 'thanks': 0.36; "i'll": 0.36; 'url:org': 0.36; 'received:10': 0.37; 'message-id:@gmail.com': 0.38; 'same.': 0.38; 'to:addr :python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'name:': 0.61; '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=xhwQtimNztBnDqegohBkI+rHaN1A4wzz33/XTTjii/Q=; b=qDa/6DarfGWFg90/ubDZ0PrVM68tZGneEZ0/CUyBNP5sOgyKDA/pYRIm1UItRQ3xrC bttNTASeQG3X0WlRqHrdoJ8YWfKli2kMjDP6UOJgjG0LDH/qcncWloEnvcUg+hatmRVx cW3Eh4a/x3BQDhPLD9GHCqcqO4Rap1MQmFAq0Gz0bWq6QpkyrVmgedCg9S5S0jO9CNEO g+i06zemmkbBmh7AlDdnAbw/3omTuDk1FGazpHnMOOQKaQ+jdc+bDcc8qYE+msmTeUHB 3mS/zDx296nYjBw2EGmUlKr5D9Uc9RSvO89Z2cqEv+azm4ScNVp3zOfTsKMZUfSW1Yhs 0OUQ== X-Received: by 10.15.107.194 with SMTP id cb42mr4674524eeb.136.1371237283484; Fri, 14 Jun 2013 12:14:43 -0700 (PDT) Date: Fri, 14 Jun 2013 21:14:41 +0200 From: Andreas Perstinger 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: <0E172A5A-F6C8-43CC-837A-3107BFDFFFCD@studiosola.com> <1C2B340A-D864-4991-BAA8-B8C35880EF1F@studiosola.com> <79299D98-0369-446B-B0FB-2E944250DEC6@studiosola.com> <9B89A4BB-D19A-4623-862D-402EE6856157@studiosola.com> In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371237290 news.xs4all.nl 15867 [2001:888:2000:d::a6]:52967 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48210 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 "", line 2, in > 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