I'm getting TypeError: 'NoneType' object is not subscriptable, as I am trying to print r1 which gets value from rjson['data']['last_price']. Please let me know why rjson is not fetching the value, the code was working fine until last week. Please Help !
import requests,time,json import pandas as pd import numpy as np import logging from kiteconnect import KiteConnect
I'm trying to retrieve websocket instrument list, however im not able to view the full instrument list... and the below link does not seem to work .. please let me know if I'm on the correct direction
Instruments dump is a CSV file. All other API calls will respond with JSON type response. All the JSON type POST requests are now the form type requests.
In general, the error means that you attempted to index an object that doesn't have that functionality. You are trying to subscript an object which you think is a list or dict, but actually is None. NoneType is the type of the None object which represents a lack of value, for example, a function that does not explicitly return a value will return None. 'NoneType' object is not subscriptable is the one thrown by python when you use the square bracket notation object[key] where an object doesn't define the __getitem__ method .
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /instruments/MCX/COPPERM18JUNFUT?api_key=xxxxx&access_token=xxxxxHTTP/1.1" 404 None
*********************************** None
https://kite.trade/docs/connect/v3/user/#signing-requests
https://kite.trade/docs/connect/v3/market-quotes/#instruments
json reqests have become redundant (or replaced by curl reqests) post launch of the new API?
https://kite.trade/docs/connect/v3/market-data-and-instruments/#retrieving-full-instrument-list
All the JSON type POST requests are now the form type requests.
when i use the below.. I get 'NoneType' object is not subscriptable Error
r = requests.get('https://api.kite.trade/instruments/NSE/HINDALCO?api_key=xxxxx&access_token=xxxxxx')
r1=rjson['data']['last_price']