0

When I simply just import pyfolio, I found this error. I've searched on internet, I found some posts saying it's the API issue BTW data provider and pandas(never able to get yahoo data anyway). However, I couldn't find a way to solve it. Is there anyone can help me with this please?

Thanks a lot for your time.

My version of pandas and pyfolio is below:

pyfolio(0.8.0)
pandas(0.20.3)
pandas-datareader(0.3.0.post0)

import pyfolio

Traceback (most recent call last):

File "", line 1, in import pyfolio

File "C:\Users\user\Anaconda3\lib\site-packages\pyfolio__init__.py", line 3, in from . import utils

File "C:\Users\user\Anaconda3\lib\site-packages\pyfolio\utils.py", line 24, in import empyrical.utils

File "C:\Users\user\Anaconda3\lib\site-packages\empyrical__init__.py", line 21, in from .stats import (

File "C:\Users\user\Anaconda3\lib\site-packages\empyrical\stats.py", line 23, in from .utils import nanmean, nanstd, nanmin, up, down, roll, rolling_window

File "C:\Users\user\Anaconda3\lib\site-packages\empyrical\utils.py", line 26, in from pandas_datareader import data as web

File "C:\Users\user\Anaconda3\lib\site-packages\pandas_datareader__init__.py", line 3, in from .data import (get_components_yahoo, get_data_famafrench, get_data_google, get_data_yahoo, get_data_enigma, # noqa

File "C:\Users\user\Anaconda3\lib\site-packages\pandas_datareader\data.py", line 7, in from pandas_datareader.google.daily import GoogleDailyReader

File "C:\Users\user\Anaconda3\lib\site-packages\pandas_datareader\google\daily.py", line 1, in from pandas_datareader.base import _DailyBaseReader

File "C:\Users\user\Anaconda3\lib\site-packages\pandas_datareader\base.py", line 13, in from pandas_datareader._utils import (RemoteDataError, SymbolWarning,

File "C:\Users\user\Anaconda3\lib\site-packages\pandas_datareader_utils.py", line 5, in from pandas.core.common import PandasError

ImportError: cannot import name 'PandasError'

  • Possible duplicate of [ImportError: cannot import name 'PandasError'](https://stackoverflow.com/questions/43809620/importerror-cannot-import-name-pandaserror) – Morse Apr 05 '18 at 14:38
  • i tried as well, i uninstalled the pandas-datareader, now when i am trying to reinstall, it said failed to build wheel for wrapt... any idea of this pls? – Chan Kenneth Apr 05 '18 at 14:56

1 Answers1

0

Seems to be issue with PyFolio release.

Look at similar issue at GitHub.

Install latest version from clone of GitHub repository , that should solve the issue otherwise you need to open a issue at GitHub.

There are similar issues about Yahoo URL failures on the site.

You seem to have old version of pandas-datareader latest version is 0.6.0 as of today. And please see that Yahoo API has been deprecated lately

Warning

As of v0.6.0 Yahoo!, Google Options, Google Quotes and EDGAR have been immediately deprecated due to large changes in their API and no stable replacement.

Community
  • 1
  • 1
Morse
  • 8,258
  • 7
  • 39
  • 64