AttributeError: 'Pdb' object has no attribute 'do_previous_hist_data'

I am getting this error how to solve
previous_hist_data = tsl.get_historical_data(‘ACC’,‘NSE’,12)
DataFrame constructor not properly called!
Traceback (most recent call last):
File “C:\Users\ACER\AppData\Local\Programs\Python\Python38\lib\cmd.py”, line 214, in onecmd
func = getattr(self, ‘do_’ + cmd)
AttributeError: ‘Pdb’ object has no attribute ‘do_previous_hist_data’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “D:\Downloads\3. Session3 - Codebase\Dhan codebase\Dhan_Tradehull.py”, line 222, in get_historical_data
df = pd.DataFrame(ohlc[‘data’])
File “C:\Users\ACER\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\frame.py”, line 817, in init
raise ValueError(“DataFrame constructor not properly called!”)
ValueError: DataFrame constructor not properly called!

Hi @shinderaju123
I missed your post,

It seems that there is still some issue that you are facing. do follow below steps

  1. read Learn Algo Trading with Python | Codes | Youtube Series
    most of the issues related to data are already solved there
    Also the files were updated, so you can access to latest files

  2. Send me latest complete error screenshot, so that I can check

  3. Do send me complete zip of your folder, and share on the google drive link
    share it with: tradehull_mentorship@tradehull.com

@shinderaju123
Also there may be one more issue, check if you have subscription to Data api

image

1 Like

Hello Imran Sir

I also facing the same issue like @shinderaju123 is facing. Please help me. Screenshot attached.

Thanks

I have shared my complete zip folder to you on tradehull_mentorship@tradehull.com.

Please provide me any solution for this issue

Hi @Praveen_Dongare

  1. Historical data and LTP has been updated,
    see this video : Learn Algo Trading with Python | Codes | Youtube Series - #952 by Tradehull_Imran

  2. Also do follow this sequence while practice
    Learn Algo Trading with Python | Codes | Youtube Series - #1065 by Tradehull_Imran

  3. Also do send your questions on below thread
    Learn Algo Trading with Python | Codes | Youtube Series

:+1: on reaching till session 6.

1 Like

Hi @Tradehull_Imran Sir
I got your reply far before then my expectation. Thank you so much Sir. :saluting_face:
Now I get more motivated after getting the solution. Thanks again Sir.

1 Like