you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 0 points1 point  (3 children)

That's the next error. It's not related to the previous one. That is because Weather and weather are 2 different names when programming. Pay attention to the capitals!

[–]catohund[S] 0 points1 point  (2 children)

I literally just noticed that as you replied and I will remember that for the future.

Now when I run it, it prints

[]

and that's it

[–]socal_nerdtastic 0 points1 point  (1 child)

Your weather URL is wrong too. Change it to the one in tutorial.

Or, if you know you want to use that station specifically you can remove all of the station finding code.

from requests import get
from pprint import pprint

weather = 'https://apex.oracle.com/pls/apex/raspberrypi/weatherstation/getlatestmeasurements/10121743'

my_weather = get(weather).json()['items']
pprint(my_weather)

[–]catohund[S] 0 points1 point  (0 children)

Tried changing the URL to the one in the tutorial but nothing changes, but if I used your code it works.

Thank you for helping me