Pystardog -- issue with timeout parameter for select query

Noticing a problem with the following code:
select_results =, content_type='application/sparql-results+json', limit=limit, timeout=timeout).

A StardogException is not thrown, but a JSONDecodeError instead with the following type of message -- Expecting property name enclosed in double quotes: line 1 column 49153 (char 49152). It seems to happening whenever I limit the results to 1000 or more (could be less than that, though.)

Also, in case this helps -- I used a really short timeout in the case that I saw this happen (1 second.) I'm not sure if it happens with greater than 1 second provided.

Wondering if there is any feedback on this

I could be that the timeout abruptly cutting off the response which is why it might be happening when your limit is greater that 1000. Less than that and it can respond in less than 1 second. What does the response look like? Is it a json document that just gets chopped off?

Yes, that's exactly right, the JSON document just looks chopped off when I look at the response from Stardog in my debugger.

Another thing -- I set the timeout parameter in to 1, figuring that this was 1 second... but I was actually setting it to 1 millisecond.

So, this seems to me exactly as you say -- the timeout is abruptly cutting off the response, causing the JSONDecodeError to happen.

I figure if this situation happens again I can just catch the JSONDecodeError and treat this as a timed out query, just the same as I would do if a StardogException was thrown with a 408. It would be nice if this was handled internally by the library... maybe there is a way to request this?