Closed LkiZt closed 4 years ago
Hi @LkiZt this happens because now PyOWM is at version 3 and your code thinks it is version 2.x PyOWM 3 is a major release - therefore breaking compatibility with v2 client programs
The patch is easy: instead of
import pyowm
owm = pyowm.OWM("My API")
place = input(" ")
observation = owm.weather_at_place(place)
w = observation.weather
print(w)
just:
import pyowm
owm = pyowm.OWM("My API")
place = input(" ")
mgr = owm.weather_manager() # <<<<<
observation = mgr.weather_at_place(place) # <<<<<
w = observation.weather
print(w)
Let me know if this works for you
Hi @csparpa that works. Thank you
Start code in cmd and always have an AttributeError: "OWM" object has no attribute pip install pyown was successful Code: import pyowm
owm = pyowm.OWM("My API")
place = input(" ")
observation = owm.weather_at_place(place) w = observation.weather print(w)