Closed rahulbot closed 9 months ago
Two things:
indexer_news-search-api
but I've reproduced this on staging, where I can see logs! @philbudne, any guesses about this?File "/app/api.py", line 118, in encode
return base64.b64encode(strng.encode(), b"-_").decode().replace("=", "~")
AttributeError: 'int' object has no attribute 'encode'
It looks like the issue has to do with grabbing the paging token, in _search_result
- I'll have to jump in tomorrow to see what's at the bottom of this.
@pgulley asked:
- For some reason, I'm not actually seeing an error logged on the
indexer_news-search-api
but I've reproduced this on staging, where I can see logs! @philbudne, any guesses about this?
Only that sometimes "docker logs CONTAINERID" returns stuff that "docker service logs SERVICENAME" doesn't...
p
If you cherry-pick e44ebc6 from the unit testing branch (or make the same 1-line fix) that will fix this bug. That branch has a unit test showing a page being generated with a token for the next page.
I fixed this by merging that PR
I'm trying to test out the API integration for paging through stories and can't get the
search/results
endpoint to work. It should return a page of matching stories, but instead just returns "Internal Server Error" on both production and staging.I double checked the source code in
api.py
and I think I'm querying it properly:v1/mediacloud_search_text_*/search/result?q=biden
.Am I querying it wrong? Any way to see a more useful error message in a log file?