[Freebase-discuss] Unexpected Result/Error when querying for Blurb
Tom Morris
tfmorris at gmail.com
Thu Mar 31 06:00:23 UTC 2011
On Thu, Mar 31, 2011 at 12:57 AM, Will Merydith <will.merydith at gmail.com> wrote:
> This behavior breaks the Freebase Python module. Because it's returning a
> 404 (error).
Breaks in what way? A 404 seems a reasonable error for attempting to
fetch something that doesn't exist.
You can use a try/except block to catch network errors -- and as a
matter of fact, you probably should do since there are all kinds of
errors, from transient to permanent, that you need to handle.
Tom
>
> I'll write a fix and submit to Freebase Python.
>
>
>
>
> On Wed, Mar 30, 2011 at 6:41 PM, Will Merydith <will.merydith at gmail.com>
> wrote:
>>
>> Ah! I was looking at it the other way around, as in, "there is no content
>> matching mid /m/05d1n77, you've passed an invalid mid!". Instead it's
>> saying, "there is no Blurb for mid /m/o5d1n77". It breaks from the normal
>> MQL idioms where you pass an id for properties, and if any of those
>> properties don't exist for that id you simply get null.
>>
>> It makes sense though if I look at the url "RESTfully".
>>
>>
>>
>>
>>
>> On Wed, Mar 30, 2011 at 3:56 PM, Gordon Mackenzie <gmackenz at google.com>
>> wrote:
>>>
>>> "Pay no attention to the code behind the code..."
>>>
>>> The outer responses are the important pieces of information, as it's
>>> reporting there is no blurb existing that is linked to the /m/05d1n77
>>> node (article never created/attached to this topic). The "info:"
>>> section of the response is just that, for informational purposes only
>>> (I agree it could be more informational than "invalid id").
>>>
>>> The relevant error is the 404 and the "code":
>>> "/api/status/error/load/id_not_found"
>>>
>>> On Wed, Mar 30, 2011 at 11:39 AM, Will Merydith <will.merydith at gmail.com>
>>> wrote:
>>> > Most of my queries for Blurbs are working but once in a while I get an
>>> > error
>>> > result.
>>> >
>>> > For instance try:
>>> >
>>> >
>>> > http://api.freebase.com/api/trans/blurb/m/05d1n77?break_paragraphs=true&maxlength=2000
>>> >
>>> > Which returns:
>>> >
>>> > {
>>> > "code": "/api/status/error/content",
>>> > "messages": [
>>> > {
>>> > "code": "/api/status/error/load/id_not_found",
>>> > "info": {
>>> > "error": "invalid id",
>>> > "errorid": null,
>>> > "id": "/m/05d1n77"
>>> > },
>>> > "message": "Not a valid id"
>>> > }
>>> > ],
>>> > "status": "404 Not Found",
>>> > "transaction_id":
>>> > "cache;cache04.p01.sjc1:8101;2011-03-30T18:36:07Z;0052"
>>> > }
>>> >
>>> >
>>> > Why is the id invalid?
>>> >
>>> > Thanks, Will
>>> >
>>> > _______________________________________________
>>> > You are receiving this message because you are subscribed to the
>>> > Freebase-discuss mailing list.
>>> > To post a message to the list: Freebase-discuss at freebase.com
>>> > To unsubscribe, view archives, etc:
>>> > http://lists.freebase.com/mailman/listinfo/freebase-discuss
>>> >
>>> _______________________________________________
>>> You are receiving this message because you are subscribed to the
>>> Freebase-discuss mailing list.
>>> To post a message to the list: Freebase-discuss at freebase.com
>>> To unsubscribe, view archives, etc:
>>> http://lists.freebase.com/mailman/listinfo/freebase-discuss
>>
>
>
> _______________________________________________
> You are receiving this message because you are subscribed to the
> Freebase-discuss mailing list.
> To post a message to the list: Freebase-discuss at freebase.com
> To unsubscribe, view archives, etc:
> http://lists.freebase.com/mailman/listinfo/freebase-discuss
>
More information about the Freebase-discuss
mailing list