[Developers] "Unique query may have at most one result" Error

John Giannandrea jg at metaweb.com
Sun Sep 9 21:13:50 UTC 2007


Eric Sessions wrote:
> I am sorry for asking such a basic question.

There are no basic questions, this is exactly the right place to ask  
for help.

>   I am having a lot of trouble with a query (trying to run it in  
> the query editor.) It runs great for the first three tries then  
> fails at the fourth try. I am using cursors and taking the cursor  
> from the previous result and using it at the next query. I am  
> really lost as to what I am doing wrong.

You came across a restaurant with more than one address,
specifically http://www.freebase.com/view/village_inn

Put a [] clause around address like this:

{
   "cursor":true,
   "query":[{
     "*":null,
     "/business/retail_location/address":[{
       "citytown":[],
       "postal_code":[],
       "street_address":[],
       "street_address_2":[]
     }],
     "name":[],
     "type":"/dining/restaurant"
   }]
}


Uniqueness errors are discussed in more depth here:

http://www.freebase.com/view/helptopic?id=% 
239202a8c04000641f800000000544e13e#id2612623

-jg



More information about the Developers mailing list