python-coinmarketcap icon indicating copy to clipboard operation
python-coinmarketcap copied to clipboard

Expecting value: line 1 column 1 (char 0)

Open pbeneteau opened this issue 4 years ago • 3 comments

I get this error 50% of the times when using cryptocurrency_info():

Expecting value: line 1 column 1 (char 0)

pbeneteau avatar Dec 08 '21 01:12 pbeneteau

Hello,

Surprising error. It seems to be a JSON parser error but I can't assure it like that, I can't reproduce it. Can you give me an example code, the console return please and the Python version used please?

I'll try to answer it and provide a fix if needed as soon as possible.

rsz44 avatar Dec 13 '21 17:12 rsz44

I think it is when I send several requests in a loop with a large amount of ids. For example 1000 ids (which is the max limit) for the cryptocurrency info endpoint. Some of the queries of the same loop will throw this error.

pbeneteau avatar Dec 13 '21 17:12 pbeneteau

Unfortunately I won't be able to help you more than that if I can't reproduce the problem. If you can provide me, as requested above, the relevant code that will allow me to reproduce the error (without your API key, of course), the console return and the version of Python used, I might be able to help you.

If I am to understand that this is coming from your code and not from the library, then I will close the issue, even if your problem does not seem to be solved. Can you confirm this for me?

rsz44 avatar Dec 13 '21 17:12 rsz44