Comments (4)
Just released v1.19 which includes a fix for this issue.
from yahoofinancials.
Are you running an ad-blocker?
I am running pi-hole and had a similar issue, which I fixed by adding the yahoo finance domain names to my ad-blocker whitelist.
more info here - #159 (comment)
from yahoofinancials.
For me getting stock profile data also does not work any longer. This simple program:
from yahoofinancials import YahooFinancials
fins = YahooFinancials('AAPL', concurrent=False, max_workers=8, country="US")
companydata = fins.get_stock_profile_data()
results in this traceback:
Traceback (most recent call last):
File "<Path my test file>\yahoofinancials-GetProfile-SimpleTest.py", line 4, in <module>
companydata = fins.get_stock_profile_data()
File "<Path to my Python installation>\Python310\lib\site-packages\yahoofinancials\yf.py", line 114, in get_stock_profile_data
self.get_stock_data(statement_type='profile', tech_type='assetProfile', report_name='assetProfile'),
File "<Path to my Python installation>\Python310\lib\site-packages\yahoofinancials\etl.py", line 565, in get_stock_data
dict_ent = self._create_dict_ent(self.ticker, statement_type, tech_type, report_name, hist_obj)
File "<Path to my Python installation>\Python310\lib\site-packages\yahoofinancials\etl.py", line 521, in _create_dict_ent
re_data = self._get_historical_data(YAHOO_URL, r_map, tech_type, statement_type)
File "<Path to my Python installation>\Python310\lib\site-packages\yahoofinancials\etl.py", line 248, in _get_historical_data
self._request_handler(url, config.get("response_field"))
File "<Path to my Python installation>\Python310\lib\site-packages\yahoofinancials\etl.py", line 190, in _request_handler
cur_url += "&crumb=" + self.crumb
TypeError: can only concatenate str (not "NoneType") to str
Tested on Windows 10 with Python 3.10.1 and yahoofinancials 1.17. The error also occurs on Debian 12 with Python 3.11.2 and yahoofinancials 1.17.
from yahoofinancials.
@GerdSidan Could you try that on v1.18?
from yahoofinancials.
Related Issues (20)
- KeyError: 'incomeBeforeTax
- Get the last trading hour
- get_stock_earnings_data always fails HOT 8
- .get_key_statistics_data() results in a HTTP 401 code HOT 9
- Error when running test script HOT 4
- .get_key_statistics_data() http 401 yahoofinancials version 1.19 HOT 2
- get_key_statistic_data: 401 error HOT 2
- Problem with Demo.py HOT 4
- TypeError: can only concatenate str (not "NoneType") to str HOT 2
- get_net_income() provides the Net Income of 9/29/2020 (for AAPL) HOT 1
- get_historical_price_data() end_date HOT 4
- Can't fetch anything HOT 1
- unsupported operand type(s) for -: 'datetime.datetime' and 'str' HOT 5
- sessions.py _get_crumb does not get the crumb, it's empty HOT 6
- not working - get_financial_data() HOT 4
- TypeError: 'NoneType' object is not subscriptable
- Sleeping and retrying for a long time HOT 1
- get_historical_price_data() error HOT 1
- get_summary_data() freezes the application with a delisted stock symbol
- Unable to get any examples working.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yahoofinancials.