I could not register on Apixu because it is shutting down. Instead I got redirected to weatherstack. I registered on there, and changed urlToFetch accordingly to the new documentation.
The problem is, in the fifth step, Codecademy asks us to change the protocol from HTTP to HTTPS to avoid mixed protocol browers error.
However, when I make the request to weatherstack API, I receive an error saying https_access_restricted, which, according to the documentation means: The user’s current subscription plan does not support HTTPS.
I tried using HTTP instead of HTTPS in the urlToFetch but it obviously failed.
So I don’t know if there is a way to circumvent this? Or if Codecademy will have to change the API with which we will be working on this exercise?
Were you able to retrieve the data from weatherstack using HTTP? If so, just move forward, and check off step 5. I’ve raised the issue with Codecademy personnel and the forum moderators. Thanks for bringing this up.
Hi, no I was not able to get data from weatherstack. I get this info in my console:
Mixed Content: The page at ‘https://www.codecademy.com/’ was loaded over HTTPS, but requested an insecure resource ‘http://api.weatherstack.com/forecast?access_key=(commented out)&query=montreal&forecast_days=4’. This request has been blocked; the content must be served over HTTPS.
getForecast @ main.js:39
executeSearch @ main.js:78
dispatch @ jquery-3.2.1.min.js:3
q.handle @ jquery-3.2.1.min.js:3
Yeah. If I had been thinking clearly, I would have realized that before I asked.
I submitted a ticket directly to the Codecademy Team through a portal that Super Users and Moderators have access to. I’ve received acknowledgement that they are investigating the issue. I’ll try to keep you posted if you like. For now, since this project allows you to self-check the steps, I’d suggest commenting out all of the code that deals with the weather data. Finish the project using only the Foursquare venues, but check off all of the boxes as you go, so you can move on through the course. When they get the issue resolved either by changing the project completely or finding an alternate weather api, you can go back and complete it for real.
The main issue with Weatherstack is that in order to use HTTPS and/or access a 7-day forecast costs either $9.99 per month for just HTTPS or $49.99 per month to get the 7-day forecast, so that’s not a viable option for a Codecademy project.
Big gratitude to everyone who helped report these issues. We’ve just updated the project with a new, free, API.The curriculum team has also since removed the outdated walkthrough video, and we’ve put in a request to the video production team to make a new one. Thank you again for your patience!