newsflash icon indicating copy to clipboard operation
newsflash copied to clipboard

Is there a limit of context_keywords in query_tv()?

Open pssguy opened this issue 7 years ago • 4 comments

query_tv("trump", "tax,healthcare,wiretap,wiretaps,wiretapping,obamacare,avoidance,returns", start_date="2017-03-12", end_date="2017-03-13")

Error: lexical error: invalid char in json text.
                                       <!DOCTYPE html> <html lang="en-
                     (right here) ------^

If I limit to , say "tax,healthcare,wiretap" no error occurs

pssguy avatar Mar 15 '17 15:03 pssguy

There's a maximum of 50 characters (imposed by GDELT). Also, don't forget to specify timespan="custom", otherwise it defaults to timespan="all" even when you pass a start_time and end_time

yeedle avatar Mar 15 '17 15:03 yeedle

@hrbrmstr perhaps this limit should be added as a stopping condition before the query is sent to the api.

yeedle avatar Mar 15 '17 15:03 yeedle

Thanks. for swift response It might help to get both these points in vignette

pssguy avatar Mar 15 '17 16:03 pssguy

aye. agreed that a check is needed. and i've been meaning to change the behaviour of how the timespan setting works. ah, the perils of releasing quick wrapper pkg and retrofitting it for production use :-)

hrbrmstr avatar Mar 18 '17 15:03 hrbrmstr