Open FX196 opened 1 month ago
same issue here, need to install previous version to resolve the issue
Can we take some action on this asap. This is impacting the daily production jobs for us.
Can we take some action on this asap. This is impacting the daily production jobs for us.
@mrimahajan you can pin your version to the previous release by changing your requirements.txt
to say yfinance==0.2.44
. That's what I did to fix mine
I'm confused how from .screener import Screener
is causing Screener._fetch_and_parse()
to execute. It shouldn't be executing on import. I can't reproduce (Linux + Python 3.12).
@ericpien
Same issue
System Details
Same problem here, and this bug arises during import.
I was able to reproduce by testing on Python 3.11, while it was not reproducible in my dev environment (Mac + Python 3.12). It must be related to https://docs.python.org/3/whatsnew/3.12.html#pep-701-syntactic-formalization-of-f-strings in which Quote reuse was enabled for f-strings in 3.12.
But it's bad code anyway - sorry for the inconvenience. Thanks @FX196 for the fix!
The fix has been merged in. Is a new release being created?
Fix merged and released.
Is there a simple action/workflow we can add to avoid a repeat? Ideally not running all the unit tests because that involves dozens of fetches.
The updated release fixed this for our builds. Many thanks to everyone for the quick report, PR, testing, and merge! This was a textbook example of open source community awesomeness.
Describe bug
Syntax error in screener with Python 3.10. Error is coming from https://github.com/ranaroussi/yfinance/blob/main/yfinance/screener/screener.py#L101
Simple code that reproduces your problem
using Python 3.10
Debug log
No debug logs but have stack trace of the import error
Bad data proof
No response
yfinance
version0.2.45
Python version
3.10
Operating system
No response