Home
Forums
New posts
Search forums
Online Courses
2023 Rankings
2023 MFE Programs Rankings Methodology
Reviews
Latest reviews
Search resources
Tracker
What's new
New posts
New media
New media comments
New resources
New profile posts
Latest activity
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
C++ Programming for Financial Engineering
Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering.
Learn more
Join!
Python for Finance with Intro to Data Science
Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job.
Learn more
Join!
An Intuition-Based Options Primer for FE
Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models.
Learn more
Join!
Home
Forums
Online Courses
Python for Finance with Intro to Data Science
Yahoo finance is not working
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="sale" data-source="post: 291003" data-attributes="member: 46349"><p>Hi, </p><p>I get the following error when i use yahoo finance in python, see below. Is yahoo finance site down. What should i do to get yahoo finance to work.</p><p>I get the error when i run the following code in python</p><p>stock = input("Enter the stock symbol (enter 'quit' to stop): ") #Query user for stock ticker</p><p></p><p></p><p>while stock != "quit": #Runs this loop until user enters 'quit' (can do many stocks in a row)</p><p> df = pdr.get_data_yahoo(stock, start, now)</p><p> close=df["Adj Close"][-1]</p><p></p><p></p><p>thanks for help</p><p></p><p>C:\Saleem\Undervisning\Programmering\PythonProjects\Python-demos>python demo.py</p><p>Enter the stock symbol (enter 'quit' to stop): qqq</p><p>Exception in thread Thread-1:</p><p>Traceback (most recent call last):</p><p> File "C:\Users\mosa0003\AppData\Local\Programs\Python\Python39\lib\threading.py", line 954, in _bootstrap_inner</p><p> self.run()</p><p> File "C:\Users\mosa0003\AppData\Local\Programs\Python\Python39\lib\threading.py", line 892, in run</p><p> self._target(*self._args, **self._kwargs)</p><p> File "C:\Users\mosa0003\AppData\Roaming\Python\Python39\site-packages\multitasking\__init__.py", line 102, in _run_via_pool</p><p> return callee(*args, **kwargs)</p><p> File "C:\Users\mosa0003\AppData\Roaming\Python\Python39\site-packages\yfinance\multi.py", line 167, in _download_one_threaded</p><p> data = _download_one(ticker, start, end, auto_adjust, back_adjust,</p><p> File "C:\Users\mosa0003\AppData\Roaming\Python\Python39\site-packages\yfinance\multi.py", line 179, in _download_one</p><p> return Ticker(ticker).history(period=period, interval=interval,</p><p> File "C:\Users\mosa0003\AppData\Roaming\Python\Python39\site-packages\yfinance\base.py", line 157, in history</p><p> data = data.json()</p><p> File "C:\Users\mosa0003\AppData\Roaming\Python\Python39\site-packages\requests\models.py", line 900, in json</p><p> return complexjson.loads(self.text, **kwargs)</p><p> File "C:\Users\mosa0003\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads</p><p> return _default_decoder.decode(s)</p><p> File "C:\Users\mosa0003\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode</p><p> obj, end = self.raw_decode(s, idx=_w(s, 0).end())</p></blockquote><p></p>
[QUOTE="sale, post: 291003, member: 46349"] Hi, I get the following error when i use yahoo finance in python, see below. Is yahoo finance site down. What should i do to get yahoo finance to work. I get the error when i run the following code in python stock = input("Enter the stock symbol (enter 'quit' to stop): ") #Query user for stock ticker while stock != "quit": #Runs this loop until user enters 'quit' (can do many stocks in a row) df = pdr.get_data_yahoo(stock, start, now) close=df["Adj Close"][-1] thanks for help C:\Saleem\Undervisning\Programmering\PythonProjects\Python-demos>python demo.py Enter the stock symbol (enter 'quit' to stop): qqq Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\mosa0003\AppData\Local\Programs\Python\Python39\lib\threading.py", line 954, in _bootstrap_inner self.run() File "C:\Users\mosa0003\AppData\Local\Programs\Python\Python39\lib\threading.py", line 892, in run self._target(*self._args, **self._kwargs) File "C:\Users\mosa0003\AppData\Roaming\Python\Python39\site-packages\multitasking\__init__.py", line 102, in _run_via_pool return callee(*args, **kwargs) File "C:\Users\mosa0003\AppData\Roaming\Python\Python39\site-packages\yfinance\multi.py", line 167, in _download_one_threaded data = _download_one(ticker, start, end, auto_adjust, back_adjust, File "C:\Users\mosa0003\AppData\Roaming\Python\Python39\site-packages\yfinance\multi.py", line 179, in _download_one return Ticker(ticker).history(period=period, interval=interval, File "C:\Users\mosa0003\AppData\Roaming\Python\Python39\site-packages\yfinance\base.py", line 157, in history data = data.json() File "C:\Users\mosa0003\AppData\Roaming\Python\Python39\site-packages\requests\models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "C:\Users\mosa0003\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Users\mosa0003\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) [/QUOTE]
Verification
Post reply
Home
Forums
Online Courses
Python for Finance with Intro to Data Science
Yahoo finance is not working
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top