Error while running in AWS EC2 Linux

Hi,

I have a working code running locally on my laptop using nsepython.
I updated the code to use nsepythonserver and tried running it on AWS EC2 Linux(ap-south-1b).
I get the below error.

oi_data, spot, timestamp = oi_chain_builder('NIFTY')
File "/home/ec2-user/.local/lib/python3.9/site-packages/nsepythonserver/rahu.py", line 125, in oi_chain_builder
expiry = payload['records']['expiryDates'][0]
KeyError: 'records'

Tried different symbol, expiry etc. No luck. Is this because AWS is blocked?

  • ap = Asia Pacific
  • south-1 = Mumbai Region
  • b = A specific data center (availability zone) within that region

AWS of India is not blocked as far as I know. I use DigitalOcean Bangalore, so I can not comment on that. Debug that possibility.

But make sure you’re on the latest version.