-
- >>> import pandas as pd
- >>> from datetime import date
- >>> from mpl_finance import quotes_historical_yahoo_ochl
- >>> today = date.today()
- >>> start = (today.year-1,today.month,today.day)
- >>> quotes = quotes_historical_yahoo_ochl('AXP',start,today)
- Traceback (most recent call last):
- File "/usr/lib/python3.4/urllib/request.py", line 1183, in do_open
- h.request(req.get_method(), req.selector, req.data, headers)
- File "/usr/lib/python3.4/http/client.py", line 1137, in request
- self._send_request(method, url, body, headers)
- File "/usr/lib/python3.4/http/client.py", line 1182, in _send_request
- self.endheaders(body)
- File "/usr/lib/python3.4/http/client.py", line 1133, in endheaders
- self._send_output(message_body)
- File "/usr/lib/python3.4/http/client.py", line 963, in _send_output
- self.send(msg)
- File "/usr/lib/python3.4/http/client.py", line 898, in send
- self.connect()
- File "/usr/lib/python3.4/http/client.py", line 871, in connect
- self.timeout, self.source_address)
- File "/usr/lib/python3.4/socket.py", line 494, in create_connection
- for res in getaddrinfo(host, port, 0, SOCK_STREAM):
- File "/usr/lib/python3.4/socket.py", line 533, in getaddrinfo
- for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
- socket.gaierror: [Errno -2] Name or service not known
-
- During handling of the above exception, another exception occurred:
-
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "/usr/local/lib/python3.4/dist-packages/mpl_finance-0.10.0-py3.4.egg/mpl_finance.py", line 405, in quotes_historical_yahoo_ochl
- File "/usr/local/lib/python3.4/dist-packages/mpl_finance-0.10.0-py3.4.egg/mpl_finance.py", line 495, in _quotes_historical_yahoo
- File "/usr/local/lib/python3.4/dist-packages/mpl_finance-0.10.0-py3.4.egg/mpl_finance.py", line 354, in fetch_historical_yahoo
- File "/usr/lib/python3.4/urllib/request.py", line 161, in urlopen
- return opener.open(url, data, timeout)
- File "/usr/lib/python3.4/urllib/request.py", line 464, in open
- response = self._open(req, data)
- File "/usr/lib/python3.4/urllib/request.py", line 482, in _open
- '_open', req)
- File "/usr/lib/python3.4/urllib/request.py", line 442, in _call_chain
- result = func(*args)
- File "/usr/lib/python3.4/urllib/request.py", line 1211, in http_open
- return self.do_open(http.client.HTTPConnection, req)
- File "/usr/lib/python3.4/urllib/request.py", line 1185, in do_open
- raise URLError(err)
- urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>
- >>>
-