Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yfinance error——AttributeError: 'Index' object has no attribute 'tzinfo' #15

Open
Buen16 opened this issue Jun 6, 2023 · 2 comments

Comments

@Buen16
Copy link

Buen16 commented Jun 6, 2023

1 Failed download:
- ETH-USD: No data found for this date range, symbol may be delisted
Traceback (most recent call last):
  File "D:\my ebooks\autotrader-demo-main\runfile.py", line 26, in <module>
    at.run()
  File "D:\Program Files\anaconda3\envs\atdemo\lib\site-packages\autotrader\autotrader.py", line 1142, in run
    self._main()
  File "D:\Program Files\anaconda3\envs\atdemo\lib\site-packages\autotrader\autotrader.py", line 1613, in _main
    bot = AutoTraderBot(
  File "D:\Program Files\anaconda3\envs\atdemo\lib\site-packages\autotrader\autobot.py", line 223, in __init__
    self._refresh_data(deploy_dt)
  File "D:\Program Files\anaconda3\envs\atdemo\lib\site-packages\autotrader\autobot.py", line 449, in _refresh_data
    data, multi_data, quote_data, auxdata = self.Stream.refresh(timestamp=timestamp)
  File "D:\Program Files\anaconda3\envs\atdemo\lib\site-packages\autotrader\utilities.py", line 1174, in refresh
    data = data_func(
  File "D:\Program Files\anaconda3\envs\atdemo\lib\site-packages\autotrader\autodata.py", line 783, in _yahoo
    if data.index.tzinfo is None:
AttributeError: 'Index' object has no attribute 'tzinfo'

I have tried every solution, but they didn't work. I have tried many versions of yfiance and pandas, but this problem still exist

@Auditor1234
Copy link

Have you ever solved this problem yet? I also encountered this.

@Auditor1234
Copy link

Auditor1234 commented Jan 26, 2024

I think I have got the answer. This problem occurs when your country or region is not supported by yahoo finance website. So you only need to change your IP location, just use VPN to change your IP, that is it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants