[Developers] bug: upload fails for certain strings
John Giannandrea
jg at metaweb.com
Sun Apr 1 01:43:04 UTC 2007
Hi
We have had some bugs around content type sniffing.
You might try setting the mime type to text/plain.
Are you uploading to sandbox? if so could you give us
your login id or an approx log time so we can find the
actual upload entries.
Thanks.
-jg
On Mar 31, 2007, at 5:46 PM, Mike Travers wrote:
> [Apologies if this isn't the right place for bug reports.]
>
> I'm bulk-uploading some data and ran into a bug. The upload service
> fails for certain strings. Here's what I see, using the Python upload
> routine included in the API documentation:
>
>>>> metaweb.upload("random string", "text/text", credentials)
> u'#9202a8c04000641f800000000504e188'
>>>> metaweb.upload("P1,", "text/text", credentials)
> {u'status': u'400', u'messages': [u'image/x-portable-bitmap is not an
> acceptable mime-type.']}
>
>>>> metaweb.upload(" P1,", "text/text", credentials)
> u'#9202a8c04000641f800000000504e18e'
>>>> metaweb.upload("P1", "text/text", credentials)
> u'#9202a8c04000641f800000000504e182'
>>>> metaweb.upload("P2.foo", "text/text", credentials)
> {u'status': u'400', u'messages': [u'image/x-portable-graymap is not an
> acceptable mime-type.']}
>
> As you can see, content that begins "P1," causes an error. Some other
> variants like the last also cause bad behavior. Also, the error JSON
> that comes back is formatted in a way that breaks the normal upload
> routine, which expects the 'messages' slot to contain a list of dicts.
>
> Chasing this a bit further, it looks like something bad happens (Ajax
> hang) if you try to make a topic description that begins "P1," in the
> web interface as well.
>
> I guess something is trying to be clever about inferring the content
> type from the content. Unfortunately, it's being overly clever in this
> case since I actually do have a text string that begins this way!
> ("P1,P4-bis(5'-Guanosyl) tetraphosphate is an intermediate in the
> metabolism of Pyrimidine. It is a substrate for
> Bis(5'-nucleosyl)-tetraphosphatase.", if you are curious).
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
More information about the Developers
mailing list