clairvoyance icon indicating copy to clipboard operation
clairvoyance copied to clipboard

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Open abl3s1 opened this issue 2 years ago • 3 comments

this happening all the time Also can't import headers, how do I import them correctly?

abl3s1 avatar Aug 16 '22 10:08 abl3s1

Hello @pythonicable

You did not received json document. If you had problem with authentication, this must be related.

The error is catchable here https://github.com/nikitastupin/clairvoyance/blob/main/clairvoyance/client.py#L59, however this forward an error at the runtime.

I assume you are running the program in CLI, you will import headers like curl does.

clairvoyance -o schema.json -H "Authorization: Bearer Token" -H "AnotherHeader: Placeholder" http://example.com

Can you update the issue once you tried with correct headers?

nullswan avatar Aug 17 '22 08:08 nullswan

yes. I imported the correct headers, and it throws me the same error after a bit.

abl3s1 avatar Aug 17 '22 11:08 abl3s1

Have the same problem. The issue is that server starts blocking requests with 403 error at some point. Probably just too many at the same time (default is 50 threads). Might try to reduce threads to 1 with '-c' option. clairvoyance only handles 500+ errors to retry, might want to handle 403 errors more gracefully.

d-kar avatar Sep 13 '22 05:09 d-kar