Nse_results giving JSONDecodeError

Hi,

I am hitting an error while calling the Result API. I was earlier using the older method nse_events() in the older version of nsepython and it was working fine but in the newer version of nsepython (2.6), both nse_events() & nse_results() throw an error.

ipdb> nse_**results()**
*** requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ipdb> nse_**results**("equities","Others")
*** requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ipdb> nse_**events()**
*** requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Anyone else having the same issue?
1 Like

Hey Amit (@dexter),
Could you please advise on this.

It is very much system specific. As I use only server version I have no clue. Because it works for some people and does not work for some people.

What is your system configuration?

1 Like

For now, I rolled back to older version that is working on my other machine using below command, and I am able to get events data again. I was earlier on v2.6

pip install --force-reinstall -v "nsepython==0.0.972"
2 Likes

It means i have fucked something in middle. i willcheck

I thank you a lot. This is what happens in democracy. I had patched a code by someone in this forum and it worked for him and broke for 100 people lol. I am updating a new patch in nsepython. Install the latest version now.

1 Like

If You are having the problem, JSONDecodeEorr upgrade to the latest

pip3 install --upgrade nsepython

If the problem still persists, Let me know.

1 Like