Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when executing #2

Open
dooley1001 opened this issue Jun 11, 2018 · 0 comments
Open

Error when executing #2

dooley1001 opened this issue Jun 11, 2018 · 0 comments

Comments

@dooley1001
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant