T
T
Totchtonezanyat2021-12-12 05:42:36
Python
Totchtonezanyat, 2021-12-12 05:42:36

I can't figure out what's wrong and how to fix it?

Greetings to all newbies who are not indifferent to stupid mistakes!
Code
import pyowm
O = OWM('763msh584b000e2d470bep14af58jsn0f3e002efc00', Language = 'ru')

place = input("Which city/country?:")
observation = weather_at_place(place)
w = observation.get_weather()
temp = w.get_temperature( "celsius")["temp"]

print('In the city ' + place + ' now' + w.get_detailed_status())
print('The temperature is now in the area ' + str(temp))

:

AttributeError: partially initialized module 'pyowm ' has no attribute 'OWM' (most likely due to a circular import

)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
galaxy, 2021-12-12
@galaxy

Is the script file called pyowm.py?

O
Osmanov Osman, 2021-12-12
@OSMANOF

from pyowm.owm import OWM
instead of
import pyowm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question