You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
c:\python35\lib\json_init_.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
310 if not isinstance(s, str):
311 raise TypeError('the JSON object must be str, not {!r}'.format(
--> 312 s.class.name))
313 if s.startswith(u'\ufeff'):
314 raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)",
TypeError: the JSON object must be str, not 'bytes'
The text was updated successfully, but these errors were encountered:
When executing the second cell i get the following:
TypeError Traceback (most recent call last)
in ()
1 endpoint = 'https://min-api.cryptocompare.com/data/histoday'
2 res = requests.get(endpoint + '?fsym=BTC&tsym=USD&limit=2000')
----> 3 hist = pd.DataFrame(json.loads(res.content)['Data'])
4 hist = hist.set_index('time')
5 hist.index = pd.to_datetime(hist.index, unit='s')
c:\python35\lib\json_init_.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
310 if not isinstance(s, str):
311 raise TypeError('the JSON object must be str, not {!r}'.format(
--> 312 s.class.name))
313 if s.startswith(u'\ufeff'):
314 raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)",
TypeError: the JSON object must be str, not 'bytes'
The text was updated successfully, but these errors were encountered: