Python-NSE-Option-Chain-Analyzer icon indicating copy to clipboard operation
Python-NSE-Option-Chain-Analyzer copied to clipboard

getting error while running (max(call_oi_list_2) ValueError: max() iterable argument is empty BANKNIFTY

Open sudhakarsi opened this issue 2 months ago • 0 comments

C:\Users\sudha\Option-Chain-Analyzer\NSE_Option_Chain_Analyzer.py:1054: FutureWarning: Passing literal json to 'read_json' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. df: pandas.DataFrame = pandas.read_json(response.text) C:\Users\sudha\Option-Chain-Analyzer\NSE_Option_Chain_Analyzer.py:1422: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos] int_call_oi: int = int(entire_oc.iloc[i, [0]][0]) C:\Users\sudha\Option-Chain-Analyzer\NSE_Option_Chain_Analyzer.py:1430: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos] int_put_oi: int = int(entire_oc.iloc[i, [20]][0]) Exception in Tkinter callback Traceback (most recent call last): File "C:\Program Files\Python313\Lib\tkinter_init_.py", line 2074, in call return self.func(*args) ~~~~~~~~~^^^^^^^ File "C:\Program Files\Python313\Lib\tkinter_init_.py", line 862, in callit func(*args) ~~~~^^^^^^^ File "C:\Users\sudha\Option-Chain-Analyzer\NSE_Option_Chain_Analyzer.py", line 1461, in main call_oi_index_2: int = put_oi_index + call_oi_list_2.index(max(call_oi_list_2)) ~~~^^^^^^^^^^^^^^^^ ValueError: max() iterable argument is empty

sudhakarsi avatar Oct 29 '25 15:10 sudhakarsi