Hey I have been studying with a book python for finance and I’m facing a problem with the given code of the book:
#1.Import libraries import pandas as pd import quandl #2.Authenticate with API-Key: quandl.ApiConfig.api_key= '3yZWNchku9AVCYJgou7s' #3.Download the data: df_quandl = quandl.get(dataset='WIKI/APPL', start_date='2010-01-01', end_date='2020-11-30')
The error:
JSONDecodeError Traceback (most recent call last) File ~/.pyenv/versions/3.10.5/lib/python3.10/site-packages/requests/models.py:974, in Response.json(self, **kwargs) 973 try: --> 974 return complexjson.loads(self.text, **kwargs) 975 except JSONDecodeError as e: 976 # Catch JSON-related errors and raise as requests.JSONDecodeError 977 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError File ~/.pyenv/versions/3.10.5/lib/python3.10/json/__init__.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 343 if (cls is None and object_hook is None and 344 parse_int is None and parse_float is None and 345 parse_constant is None and object_pairs_hook is None and not kw): --> 346 return _default_decoder.decode(s) 347 if cls is None: File ~/.pyenv/versions/3.10.5/lib/python3.10/json/decoder.py:337, in JSONDecoder.decode(self, s, _w) 333 """Return the Python representation of ``s`` (a ``str`` instance 334 containing a JSON document). 335 336 """ --> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 338 end = _w(s, end).end() File ~/.pyenv/versions/3.10.5/lib/python3.10/json/decoder.py:355, in JSONDecoder.raw_decode(self, s, idx) 84 return response.json() 85 except ValueError: ---> 86 raise QuandlError(http_status=response.status_code, http_body=response.text) QuandlError: (Status 403) Something went wrong. Please try again. If you continue to have problems, please contact us at connect@quandl.com.
submitted by /u/Narrow-Winter-6998
[link] [comments]
r/learnpython Hey I have been studying with a book python for finance and I’m facing a problem with the given code of the book: #1.Import libraries import pandas as pd import quandl #2.Authenticate with API-Key: quandl.ApiConfig.api_key= ‘3yZWNchku9AVCYJgou7s’ #3.Download the data: df_quandl = quandl.get(dataset=’WIKI/APPL’, start_date=’2010-01-01′, end_date=’2020-11-30′) The error: JSONDecodeError Traceback (most recent call last) File ~/.pyenv/versions/3.10.5/lib/python3.10/site-packages/requests/models.py:974, in Response.json(self, **kwargs) 973 try: –> 974 return complexjson.loads(self.text, **kwargs) 975 except JSONDecodeError as e: 976 # Catch JSON-related errors and raise as requests.JSONDecodeError 977 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError File ~/.pyenv/versions/3.10.5/lib/python3.10/json/__init__.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 343 if (cls is None and object_hook is None and 344 parse_int is None and parse_float is None and 345 parse_constant is None and object_pairs_hook is None and not kw): –> 346 return _default_decoder.decode(s) 347 if cls is None: File ~/.pyenv/versions/3.10.5/lib/python3.10/json/decoder.py:337, in JSONDecoder.decode(self, s, _w) 333 “””Return the Python representation of “s“ (a “str“ instance 334 containing a JSON document). 335 336 “”” –> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 338 end = _w(s, end).end() File ~/.pyenv/versions/3.10.5/lib/python3.10/json/decoder.py:355, in JSONDecoder.raw_decode(self, s, idx) 84 return response.json() 85 except ValueError: —> 86 raise QuandlError(http_status=response.status_code, http_body=response.text) QuandlError: (Status 403) Something went wrong. Please try again. If you continue to have problems, please contact us at connect@quandl.com. submitted by /u/Narrow-Winter-6998 [link] [comments]
Hey I have been studying with a book python for finance and I’m facing a problem with the given code of the book:
#1.Import libraries import pandas as pd import quandl #2.Authenticate with API-Key: quandl.ApiConfig.api_key= '3yZWNchku9AVCYJgou7s' #3.Download the data: df_quandl = quandl.get(dataset='WIKI/APPL', start_date='2010-01-01', end_date='2020-11-30')
The error:
JSONDecodeError Traceback (most recent call last) File ~/.pyenv/versions/3.10.5/lib/python3.10/site-packages/requests/models.py:974, in Response.json(self, **kwargs) 973 try: --> 974 return complexjson.loads(self.text, **kwargs) 975 except JSONDecodeError as e: 976 # Catch JSON-related errors and raise as requests.JSONDecodeError 977 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError File ~/.pyenv/versions/3.10.5/lib/python3.10/json/__init__.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 343 if (cls is None and object_hook is None and 344 parse_int is None and parse_float is None and 345 parse_constant is None and object_pairs_hook is None and not kw): --> 346 return _default_decoder.decode(s) 347 if cls is None: File ~/.pyenv/versions/3.10.5/lib/python3.10/json/decoder.py:337, in JSONDecoder.decode(self, s, _w) 333 """Return the Python representation of ``s`` (a ``str`` instance 334 containing a JSON document). 335 336 """ --> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 338 end = _w(s, end).end() File ~/.pyenv/versions/3.10.5/lib/python3.10/json/decoder.py:355, in JSONDecoder.raw_decode(self, s, idx) 84 return response.json() 85 except ValueError: ---> 86 raise QuandlError(http_status=response.status_code, http_body=response.text) QuandlError: (Status 403) Something went wrong. Please try again. If you continue to have problems, please contact us at connect@quandl.com.
submitted by /u/Narrow-Winter-6998
[link] [comments]