clairvoyance
clairvoyance copied to clipboard
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
this happening all the time Also can't import headers, how do I import them correctly?
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?
yes. I imported the correct headers, and it throws me the same error after a bit.
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.