-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Exception near "without": syntax error - ticker.fast_info['market_cap'] #1372
Comments
Post exact code that reproduces error. |
ticker = yf.Ticker('AAPL') |
Actually, there's more info you need to provide. Read this properly |
yf version is 0.2.9 OS: AWS amazon Linux 2.0 |
All exceptions generate a traceback. What is confusing about this request? |
Full Code 👍 import yfinance as yf try:
except Exception as e: Full Log 👍 AAPL ..Start..lazy-loading dict with keys = ['currency', 'exchange', 'timezone', 'shares', 'market_cap', 'last_price', 'previous_close', 'open', 'day_high', 'day_low', 'regular_market_previous_close', 'last_volume', 'fifty_day_average', 'two_hundred_day_average', 'ten_day_average_volume', 'three_month_average_volume', 'year_high', 'year_low', 'year_change']145.92999267578125Exception near "without": syntax error |
You are deliberately discarding the traceback by doing this. Stop making this difficult. |
Oh Sorry.. Traceback (most recent call last): |
Run this, print output:
And what is your Python version? |
Python version is Python 3.7.16 |
So that error message generated by old sqlite bundled in old Python. Can update Python to 3.8? |
Alternatively, this branch should fix error: |
Thanks. I will try both solutions! |
I solved it by upgrading the sqlite3 version. |
Hey My local machine has this configuration and my Amazon MWAA Airflow configuration is @zacra how did you upgrade the sqlite version, can you please share the steps? |
Even I am facing the same problem. Not able to use yfinance in AWS Airflow 2.4.3 |
try below command! pip3 install yfinance --upgrade --no-cache-dir wget https://kojipkgs.fedoraproject.org//packages/sqlite/3.8.11/1.fc21/x86_64/sqlite-devel-3.8.11-1.fc21.x86_64.rpm |
@zacra Locally I'm able to update sqlite. |
Oh I use AWS EC2. |
You don't need to. PIP pre-release 0.2.10b1 has a fix for older sqlite verison (and |
A very simple test
The output
OS is
And, thank you all for yfinance ! |
Hi @clxy, I ran the following code in Amazon MWAA Airflow:-
This is the output that I got:
|
@clxy If I ran similar code on my local machine
I get the following output:-
|
@clxy @ValueRaider the issue is that there is no way for me to upgrade the version of the sqlite3 library on Amazon MWAA Airflow. So effectively, yfinance is broken for me if I use it on Amazon MWAA Airflow. |
I have no idea about Amazon MWAA Airflow.
And, they just released the 0.2.10 today. |
I want to import 'market_cap' information, but I am getting an error.
Exception near "without": syntax error
check please
The text was updated successfully, but these errors were encountered: