Home>

I want to write code for the weather, but I come across many mistakes that I can not solve

Import Libraries
Import pyowm.
Creating variables
Token= ('A5FCBB0425462F462A30E03E0024D121')
CITY= ("Moscow")
Observation= OWM.GET_WEAATHER_AT_PLACE (CITY)
w= observation.get_weather ()
Temperature= W.Get_temperature ()
#Output
Print ("At the moment, in Moscow?:" + Str (Temperature) + "° C")
Print ("Also in this city:" + W.Get_detailed_status ())

Here is the code itself, what's wrong?

gives this such a mistake at the moment when starting

TracEBack (MOST Recent Call Last):
  File "D: \ Python \ Probing1.py", Line 7, In <
Module >
    Observation= OWM.GET_WEAATHER_AT_PLACE (CITY)
NameError: Name 'Owm' Is Not Defined

also there is such a code

Import Libraries
Import pyowm.
Creating variables
Owm= pyowm.owm ('A5FCBB0425462F462A30E03E0024D121')
CITY= ("Moscow")
Observation= OWM.GET_WEAATHER_AT_PLACE (CITY)
w= observation.get_weather ()
Temperature= W.Get_temperature ()
#Output
Print ("At the moment, in Moscow?:" + Str (Temperature) + "° C")
Print ("Also in this city:" + W.Get_detailed_status ())
TracEBack (MOST Recent Call Last):
  File "D: \ Python \ Probing1.py", Line 7, In <
Module >
    Observation= OWM.GET_WEAATHER_AT_PLACE (CITY)
ATTRIBUTEERROR: 'OWM' OBJECT HAS NO ATTRIBUTE 'GET_WEAATHER_AT_PLACE'

Help

The most important skill programmer is the ability to read and understand errors. It is even more important than the programming itself.

Эникейщик2021-04-09 15:39:34

Another important ability -to give good headlines, reflecting the essence of the problem, and not water on a kiere

Эникейщик2021-04-09 15:41:39

I already read the site with Pyowm and wrote the code, as it was all written, but constantly issues errors

Дмитрий2021-04-09 15:45:52

from pyowm import otem otem= otem (151d78f45cca4317d79ea9438fe72a63) mgr= oteather_manager () observation= mgr.weather_at_place ('london, gb') w= observation.weather print (w) This is all the same error file "D: \ Python \ Probing1.py ", Line 3 OWM= OWM (151D78F45CCA4317D79EA9438FE72A63) ^ SyntaXerror: Invalid Syntax

Дмитрий2021-04-09 15:46:34