mitmedialab / MediaCloud-Dashboard

Front-end for the MediaCloud database
https://dashboard.mediameter.org
Apache License 2.0
16 stars 6 forks source link

/api/sentences/docs/<UTF-8 string>/... call raises an error #300

Closed pypt closed 6 years ago

pypt commented 6 years ago

Hi Rahul,

Anushka forwarded me user's report about a failing dashboard search for an Ukrainian term:

https://dashboard.mediacloud.org/#query/["%D0%A0%D0%B0%D1%81i%D1%8F"]/[{"sets":[38381103]}]/["2018-02-01"]/["2018-02-07"]/[{"uid":217,"name":"Ukraine - National","color":"55868A"}]

I had a quick look, and it looks like api/sentences/docs/<UTF-8 string>/... call raises an error, e.g.:

https://dashboard.mediacloud.org/api/sentences/docs/%D0%A0%D0%B0%D1%81i%D1%8F/%7B%22sets%22%3A%5B38381103%5D%7D/2018-02-01/2018-02-07

returns:

{
"error": "'docs'"
}

while a similar call with Расiя replaced with google seems to work fine: https://dashboard.mediacloud.org/api/sentences/docs/google/%7B%22sets%22%3A%5B38381103%5D%7D/2018-02-01/2018-02-07.

Our end of the API doesn't seem to be hit at all, so I assume it's the Dashboard that's to blame.

rahulbot commented 6 years ago

This query is working in the Explorer for them, so we're probably not going to fix it here on Dashboard.