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

Fix malformed f-string in release 0.2.45 #2094

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Conversation

FX196
Copy link
Contributor

@FX196 FX196 commented Oct 21, 2024

Quick fix for issue #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

@fled-dev
Copy link

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.

@DavidVilem
Copy link

Hello good morning.

I am testing from databricks and it generates the same error:

Syntax error: string f: mismatch '(' (screener.py, line 101)

@vwbusguy
Copy link

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 '('

@ValueRaider ValueRaider merged commit b88a0a6 into ranaroussi:main Oct 21, 2024
2 checks passed
@FX196 FX196 deleted the patch-1 branch October 21, 2024 18:15
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

Successfully merging this pull request may close these issues.

6 participants