Really enjoying your tutorial! I wanted to reach out to point out a couple fixes that might help future readers from banging their heads on the keyboard:
adapted_price = platform['adjusted_price']
but then you refer to variable adjusted_price a couple lines down. I think "adapted_price" is supposed to be "adjusted_price"
Endless loop
On page http://newcoder.io/api/part-1/ under the load_from_file method, the section you show to type out is not complete and has:
while not line.startswith("DATE "):
pass
and leads to an endless loop, but looking in the completed source file it appears as:
if not reached_dataset:
if line.startswith("DATE "):
reached_dataset = True
continue
403 forbidden with Giant Bomb
On api call was getting 403 errors until I added headers={'user-agent':'newcoder'} to the requests.get call
Hello,
Really enjoying your tutorial! I wanted to reach out to point out a couple fixes that might help future readers from banging their heads on the keyboard:
on http://newcoder.io/api/part-3/ in the first section there is:
adapted_price = platform['adjusted_price']
but then you refer to variable adjusted_price a couple lines down. I think "adapted_price" is supposed to be "adjusted_price"On page http://newcoder.io/api/part-1/ under the load_from_file method, the section you show to type out is not complete and has:
and leads to an endless loop, but looking in the completed source file it appears as:
On api call was getting 403 errors until I added headers={'user-agent':'newcoder'} to the requests.get call