About Archive Tag Cloud Translations RSS

You are writing a comment about Search Recipes for Yahoo's BOSS in Python, here is a quick summary:

This entry is a bit of a cookbook for using Yahoo's Python library for accessing the BOSS Mashup Framework. It has full examples for searching the web, images, news , for paginating results, and for limiting searches to specific domains.


You are responding to this comment written by GIll on August 10th 2008, 21:58.

hi,Will

i get the same problem!

running any example under WinXP get error like this


Traceback (most recent call last):

File "C:searchapiboss_mashup_framework_0.1examplesex1.py", line 20, in <mo dule>

yn = db.create(name="yn", data=search("iphone", vertical="news", count=50))

File "C:Python25Libsite-packagesyosbossysearch.py", line 38, in search return rest.load_json(url)

File "C:Python25libsite-packagesyoscrawlrest.py", line 29, in load_json return simplejson.loads(download(url))

File "C:searchapiboss_mashup_framework_0.1examples_init_.py", line 313, in loads

File "buildbdist.win32eggsimplejsondecoder.py", line 321, in decode

File "buildbdist.win32eggsimplejsondecoder.py", line 340, in raw_decode

ValueError: No JSON object could be decoded


and i hope this code can make sense to you

from yos.boss import ysearch

from yos.yql import db

data = ysearch.search("Django",count=10)

then get mistake


Traceback (most recent call last): File "<pyshell#4>", line 1, in <module>

data = ysearch.search("Django",count=10)

File "C:Python25Libsite-packagesyosbossysearch.py", line 38, in search return rest.load_json(url)

File "C:Python25libsite-packagesyoscrawlrest.py", line 29, in load_json return simplejson.loads(download(url))

File "buildbdist.win32eggsimplejson_init_.py", line 313, in loads

File "buildbdist.win32eggsimplejsondecoder.py", line 321, in decode

obj, end = self.raw_decode(s, idx=_w(s, 0).end())

File "buildbdist.win32eggsimplejsondecoder.py", line 340, in raw_decode

raise ValueError("No JSON object could be decoded")

ValueError: No JSON object could be decoded


i think my simplejson runs well, i can get BOSS's data by using "urllib.urlopen",and use "simplejson.loads" to load the data

so it maybe encoding problem, but i don't know how to solve it

can you help me?

thx


Please be aware that comment forms go stale after one hour.





Comments may make use of LifeFlow MarkDown. Raw html will be escaped.


Quick Introduction to LifeFlow MarkDown Syntax

A highlighted code block:

@@ ruby
def a (b, c):
  b * c
end
@@

Other common languages work as well: scheme, python, java, html, etc.

Other markdown syntax:

 ### This is an h3 title
#### This is an h4 title
**this is bold**
*this is italics*

1. This is an
2. ordered list

* And an unordered
* list too

[this is a link](http://www.lethain.com/ "Lethain")