Skip to content

Commit d9233d2

Browse files
authored
ENH: More explicit RemoteDataError (#217)
closes #216
1 parent ada53df commit d9233d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas_datareader/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from pandas.core.common import is_number
1212
from pandas import Panel, DataFrame
1313
from pandas import read_csv
14+
from pandas.io.common import urlencode
1415
from pandas.compat import StringIO, bytes_to_str
1516

1617
from pandas_datareader._utils import RemoteDataError, SymbolWarning
@@ -123,7 +124,8 @@ def _get_response(self, url, params=None):
123124
if response.status_code == requests.codes.ok:
124125
return response
125126
time.sleep(self.pause)
126-
127+
if params is not None and len(params) > 0:
128+
url = url + "?" + urlencode(params)
127129
raise RemoteDataError('Unable to read URL: {0}'.format(url))
128130

129131
def _read_lines(self, out):

0 commit comments

Comments
 (0)