vikyengg2017
vikyengg2017

Reputation: 25

Python script does not display anyoutput in pycharm

I am using the below code in pycharm:-

from nsepy import get_history
from datetime import date
import pandas


start_date=date(2021, 5,1)
end_date=date.today()

df = get_history(symbol='SBIN' ,start=start_date, end=end_date )
print(df)

However it does not display anything in pycharm.

Upvotes: 1

Views: 127

Answers (2)

vikyengg2017
vikyengg2017

Reputation: 25

Yes the problem was the companies VPN connection blocking the NSEPY APi. Disabling the VPN and runing the code gave the output.

Upvotes: 0

Joe
Joe

Reputation: 65

Can confirm that copying and pasting your code returns data in the console as you can see below. I suspect you are running another script/tab when you click run in PyCharm.

enter image description here

Upvotes: 1

Related Questions