-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
pandas-1.4 yfinance-0.1.69 AttributeError: 'Index' object has no attribute 'tz_localize' #939
Comments
lol, just saw the same problem and spent an hour debugging. |
Thanks for the note! yes, downgrading pandas from 1.4 to 1.3.5 worked-around this issue. |
yes, same issue here! |
same issue here |
same here, had to roll back the pandas version |
Thanks! |
I also tried downgrading yfinance to older versions - it didn't work. There were other changes on pandas 1.4 that required some adjustments on other parts of my code - maybe this update is a broader one. |
I faced the same problem. It might be related to pandas change: df.intext.dtype=object in pandas 1.4 because dividends and splits are empty. |
Hi @mundus08 , I am a newbie in the deployment domain. I was curious how you find the exact lines which might be the solution to the problem we are facing. So, did you go through the entire code for pandas to find the prospective lines which can be causing the trouble? |
Hi @Dharmik-19 |
Duplicate of #937 I believe. |
Although #937 was closed, I still get an error message after updating Python/Pandas. I run the file test_yfinance.py and here are the results: =========================================
|
Confirm downgrading to pandas 1.3.5 solved the issue. |
any updates on a fix? |
The pandas downgrade worked for me as well. I'm looking forward to a fix for 1.4x. |
Does this still happen in the latest release? |
For me it was still causing the issue even after install panadas 1.3.5
Python Version 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] |
Thank you, |
@wgong Can you provide code that was failing before you downgraded Pandas? We want to fix this problem but we can't reproduce. |
@ValueRaider I just upgraded pandas back to 1.5.1, and cannot reproduced it either. Here is my function which failed before
|
@ValueRaider I tried on a different Ubuntu computer, and cannot reproduce the initial error. |
I downgraded to 1.3.5 and restarted the kernel but I am still getting the same error AttributeError Traceback (most recent call last) File ~\anaconda3\lib\site-packages\yfinance\base.py:279, in TickerBase.history(self, period, interval, start, end, prepost, actions, auto_adjust, back_adjust, proxy, rounding, tz, timeout, **kwargs) AttributeError: 'Index' object has no attribute 'tz_localize' please help.... |
That looks like old code. Update yfinance to latest version, confirm with |
I checked version and it says 0.1.67 |
It works fine now, I just realized the version of the pandas was not changing , I was installing it the wrong way. So, I got the correct installation and it worked |
Restarted Kernel; !pip install yfinance Confirmed |
Confirmed what? Also everyone should be able to use any version of Pandas >=1.3.0 without problems. |
In my case downgrading the pandas version to 1.3.5 is not working same error how can i resolve this |
@Abdul675 please refer to this |
Is this fixed in latest release 0.2.17? |
same issue here |
@kaili-yang Create a new issue following its instructions. |
It worked for me by using the code |
Just upgraded to yfinance-0.1.69 and pandas-1.4 you will likely hit this issue. The code is trivial and used to work fine. Any suggestions?
python-3.9.10
windows 10
The text was updated successfully, but these errors were encountered: