Closed FX196 closed 1 month ago
Just tried it on my system (macOS 15.1 / Python 3.11.9) and it works like a charm. Thanks for putting in the effort to address this issue.
Hello good morning.
I am testing from databricks and it generates the same error:
Syntax error: string f: mismatch '(' (screener.py, line 101)
I just tested against an image environment that failed tests from this error and this patch works:
pip install --force git+https://github.com/FX196/yfinance@patch-1
python -c 'import yfinance'
Without the patch on the same image environment:
python -c 'import yfinance'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/lib/python3.11/site-packages/yfinance/__init__.py", line 30, in <module>
from .screener.screener import Screener
File "/opt/conda/lib/python3.11/site-packages/yfinance/screener/__init__.py", line 1, in <module>
from .screener import Screener
File "/opt/conda/lib/python3.11/site-packages/yfinance/screener/screener.py", line 101
logger.error(f"Failed to get screener data for '{self._body.get('query', "query not set")}' reason: {e}")
^^^^^
SyntaxError: f-string: unmatched '('
Quick fix for issue https://github.com/ranaroussi/yfinance/issues/2093 This broke yfinance for me after I automatically upgraded to the latest release.
Existing tests should suffice. Directly targeting
main
because the release is broken