Hello, I am a beginner in the field of programming and I am writing code for a weather telegram bot
and when i run the code i get this error even though i do everything according to the instructions.
Here is my code:
import python_weather
from aiogram import Bot, Dispatcher, executor, types
bot = Bot(token=“xxxxxxxxx”)
dp = Dispatcher(bot)
client: python_weather.Client(format=python_weather.METRIC)
@dp.message_handler()
async def echo(message: types.message):
await client.get(message.text)
celsius = (weather.current.temperature)
resp_msg = weather.location_name + "\n"
resp_msg += f"Текущая температура: {celsius}\n"
resp_msg += f"Состояние погоды: {weather.current.sky_text}"
await message.answer(resp_msg)
if name == “main”:
executor.start_polling(dp, skip_updates=True)