captionbot icon indicating copy to clipboard operation
captionbot copied to clipboard

SyntaxError: Unexpected end of JSON input

Open freshlogic opened this issue 9 years ago • 7 comments

SyntaxError: Unexpected end of JSON input
    at Object.parse (native)
    at got.then.then.response (/Users/shawnmiller/GitHub/mehdown/node_modules/captionbot/index.js:36:26)
    at process._tickCallback (internal/process/next_tick.js:103:7)

Looks like captionbot is returning an empty response. Any ideas?

freshlogic avatar Jul 23 '16 15:07 freshlogic

Can confirm; getting (node:9594) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected end of JSON input in my console. Doesn't look like CB is liking the input.

110Percent avatar Oct 18 '16 22:10 110Percent

Same problem here. Did you guys find the solution

rajkumar-osm avatar Feb 28 '17 12:02 rajkumar-osm

It looks like they are returning an empty string instead of a JSON object. Maybe Microsoft has changed the API in some way?

I'm happy to accept a pull request that fixes the problem.

dylang avatar Feb 28 '17 16:02 dylang

Yeah, same problem here... I would like to use this for my thesis. Any solution?

toothlesspanda avatar May 29 '17 11:05 toothlesspanda

I've crated a pull request (#3), should work with that.

Delivator avatar Jun 19 '17 15:06 Delivator

I would really appreciate it, if you could merge the pull request, because i want to use this in my project :D

Delivator avatar Jul 09 '17 00:07 Delivator

@dylang pr(#3) doesn't seem to have any issues (although I don't personally like the hardcoded array access)

felipemullen avatar Sep 26 '17 01:09 felipemullen