[Developers] mql write bug help
James Taylor
jame0taylor at gmail.com
Sun Mar 1 02:48:28 UTC 2009
Hello, I'm stumped on a bug and am hoping some alternate eyes can help.
I'm http posting mql writes to add data to freebase. Most write queries are
working well, but this one seems to give me an error that I cannot reproduce
using the freebase query editor. It's likely a small error, but I can't seem
to find what's wrong. My post is:
{
"q1": {
"query": {
"id":"/guid/9202a8c04000641f800000000b0b99f0",
"type":"/location/mailing_address",
"street_address" : {
"connect" : "replace",
"value" : "test value",
"type" : "/type/text",
"lang":"/lang/en"
},
}
}
}
And my errory response is:
mqlwrite response:
{
"code": "api status error",
"messages": [
"JSON parsing error at line 1, column 252 (position 251): Unexpected
U+007D while looking for property name."
],
"status": "500 Internal Server Error",
"transaction_id":
"cache;cache02.sandbox.sjc1:8101;2009-03-01T02:34:00Z;0001"
}
And please find http info below. However f I do the similar query in the
freebase query editor (http://sandbox.freebase.com/tools/queryeditor), it
works fine:
Querry:
{
"id" : "/guid/9202a8c04000641f800000000b0b99e0",
"street_address" : {
"connect" : "replace",
"lang" : "/lang/en",
"type" : "/type/text",
"value" : "12341234"
},
"type" : "/location/mailing_address"
}
Response:
{
"id" : "/guid/9202a8c04000641f800000000b0b99f0",
"street_address" : {
"connect" : "present",
"lang" : "/lang/en",
"type" : "/type/text",
"value" : "test value"
},
"type" : "/location/mailing_address"
}
Does anyone see where my error is?
Thanks much! -JT
>>>>
http info:
DEBUG 2009-03-01 02:33:25,510 urlfetch_stub.py] Making HTTP request: host
= sandbox.freebase.com, url =
http://sandbox.freebase.com/api/account/login?username
e=true, payload = , headers = {'Content-Length': 0, 'Host': '
sandbox.freebase.com', 'Accept': '*/*', 'X-Metaweb-Request': 'adsfadf'}
login set-cookies:
metaweb-user="A|x_343634|u_bioventurist|g_#9202a8c04000641f8000000008598df8|4.Am3/uGFjamfwV3vVOrUu8w";
expires=Sun, 15-Mar-2009 02:34:00 GMT; Path=/; HttpOnly, m
rist|u_bioventurist|g_#9202a8c04000641f8000000008598df8|0.; expires=Sun,
15-Mar-2009 02:34:00 GMT; Path=/
DEBUG 2009-03-01 02:33:25,635 urlfetch_stub.py] Making HTTP request: host
= sandbox.freebase.com, url =
http://sandbox.freebase.com/api/service/mqlwrite, payl
9%22q1%22%3A+%7B%09%09%22query%22%3A+%7B%09%09%09%22id%22%3A%22%2Fguid%2F9202a8c04000641f800000000b0b99f0%22%2C%09%09%09%22type%22%3A%22%2Flocation%2Fmailing_add
+%3A+%7B%09++%09%09%09%22connect%22+%3A+%22replace%22%2C%09%09%09%09%22value%22+%3A+%22test+value%22%2C%09%09%09%09%22type%22+%3A+%22%2Ftype%2Ftext%22%2C%09+++++
09%09%09%09%7D%2C%09%09%09%7D%09%09%7D%7D, headers = {'Content-Length': 474,
'X-Metaweb-Request': 'adsfadf', 'Accept': '*/*', 'Host': '
sandbox.freebase.com', 'Co
enturist|g_#9202a8c04000641f8000000008598df8|4.Am3/uGFjamfwV3vVOrUu8w";
expires=Sun, 15-Mar-2009 02:34:00 GMT; Path=/; HttpOnly,
metaweb-user-info=A|p_%2Fuser%2F
4000641f8000000008598df8|0.; expires=Sun, 15-Mar-2009 02:34:00 GMT; Path=/',
'Content-Type': 'application/x-www-form-urlencoded'}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20090228/3604c301/attachment.htm
More information about the Developers
mailing list