Open alexyarosh opened 4 years ago
Hey @alexyarosh, thanks a lot for opening this issue, it's super well documented!
I believe the best solution to this problem would be to eliminate the "Authorization"
field from the dictionaries contained in available_requests.dat
. Doing so should make the exercise pass.
Please make sure to rename and upload this file while testing, because if you overwrite it it will cause trouble in the live course! My suggestion is to rename it to available_requests.json
, in agreement with the data format and with the package examples.
Please let me know if you still have issues after this attempt! :)
Hi @adrian-soto ,
Lack of header checks makes ch4ex5-12 in "Streamlined data ingestion with pandas" fail. Here's an example, based on ex 4.5:
Here's the data used in the exercise (I think you should be able to access the direct links, lmk if it doesn't work!):
In particular,![image](https://user-images.githubusercontent.com/16640109/73782514-3764b200-4760-11ea-8566-a4881b2048f8.png)
available_requests.dat
looks like this:Now, the pre-exercise_code + exercise pretty much goes:
When a
request
is created in L94-L112 , it ignores theheaders
information passed to.get()
and only uses theparams
information.So, in our case, a request created in L94-L112 would only have the
base_url
,term
, andlocation
fields, and would not have theAuthorization
field.But that doesn't match the format of data in the original![image](https://user-images.githubusercontent.com/16640109/73783955-96c3c180-4762-11ea-9ccd-e18e8743fcf4.png)
available_requests.dat
, so in the end, the check on L115 doesn't pass