D
D
Denis Drugov2020-04-13 23:32:13
Python
Denis Drugov, 2020-04-13 23:32:13

How to resolve error while using pyowm?

Good day!
I can't run the simplest code:

import pyowm

owm = pyowm.OWM('8aaa642f3051d68414d66436b06cea01', language = 'ru')

observation = owm.weather_around_coords (56.328715, 44.012094)

w = observation.get_weather()

print (w)


Mistake:
Traceback (most recent call last):
  File "/Users/denisdrugov/Documents/w21.py", line 7, in <module>
    w = observation.get_weather()
AttributeError: 'list' object has no attribute 'get_weather'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-04-13
@Makaroshka007

Use weather_at_coords instead of weather_around_coords

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question