#4 NaH result

open
Leif Hedstrom
5
2008-05-06
2008-05-06
Anonymous
No

When casting is <type 'float'> and the rcode is "NaN" a value error exception occurs

ValueError: invalid literal for float(): NaN

Discussion

  • Logged In: NO

    Example:
    from yahoo.search.local import LocalSearch
    srch = LocalSearch(app_id = yid, zip = "90210", query="Smith")
    dom = srch.get_results()
    results = srch.parse_results(dom)

     
  • Logged In: NO

    Hmmmm, I can't reproduce this, I ran the latest pYsearch (3.1) using your example, and it seems to work fine (i.e. no exception or anything).