Hi. This is a mismatch in the instructions. Please use api_key instead of key when defining the params. That should be the default in the boilerplate code. We’ll update the instructions and hints to mention it as well. Thank you for pointing this out!
Hello, can you look at the api key setup in the NYC Restaurant Inspections exercise for Module 4? I think it’s having a similar issue. Specifically, Exercise 2 is not running correctly.
I tried using “api_key” as a fix, but it still errored out.
The error I got was
HTTPSConnectionPool(host=‘2eraiuh.dl.ai.link’, port=443): Max retries exceeded … (Caused by SSLError: UNEXPECTED_EOF_WHILE_READING)
Hi. It’s working fine on my end. It expects api_key like in the boilerplate. That might be a temporary error. You can also try resetting your workspace just to make sure you didn’t accidentally overwrite non-graded code when you were trying to troubleshoot before. But let us know if it persists.
Unfortunately, I’ve updated my code to use api_key in the parameters like you suggested, but I’m still having an issue with Exercise 2. When I run the cell it throws an error of “SSLEOFError”.
The snippet I used was:
API_KEY = os.getenv(“RESTAURANTS_API_KEY”)
Define the parameters for the API request (setting up “key” as instructed)
params = {“api_key”: API_KEY, “limit”: 1000}
END CODE HERE
Further down in the error code, and one of the parts in red text is below. Does that mean there’s something wrong with the system timing or date, and could that be why I’m getting the error?
"f"System time is way off (before {RECENT_DATE}). This will probably "
Hi. It seems you modified code outside the START CODE HERE and END CODE HERE tags. That’s the main cause of the error (in particular, the url_info). You can refresh your workspace following the instructions here to get a blank copy of the assignment. From there, only modify code inside those tags to avoid unexpected errors. Hope this helps.