Coder Social home page Coder Social logo

Comments (4)

JECSand avatar JECSand commented on June 12, 2024 1

Just released v1.19 which includes a fix for this issue.

from yahoofinancials.

pzarfos avatar pzarfos commented on June 12, 2024

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.

GerdSidan avatar GerdSidan commented on June 12, 2024

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.

JECSand avatar JECSand commented on June 12, 2024

@GerdSidan Could you try that on v1.18?

from yahoofinancials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.