Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
abl3s1 opened this issue Aug 16, 2022 · 4 comments
Closed

Comments

@abl3s1
Copy link

abl3s1 commented Aug 16, 2022

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

@nullswan
Copy link
Collaborator

nullswan commented Aug 17, 2022

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?

@abl3s1
Copy link
Author

abl3s1 commented Aug 17, 2022

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

@d-kar
Copy link

d-kar commented Sep 13, 2022

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.

@Privat33r-dev
Copy link
Collaborator

Privat33r-dev commented Aug 27, 2024

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

Sorry for extremely late response. The error was caused by rate limiting on the server side. Currently all the similar issues are covered by #107.

If you feel that this is the Clarivoyance's issue, then feel free to open a new issue or write here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants