Answer the question
In order to leave comments, you need to log in
When creating a telegram bot on PyDroid, an error pops up, what should I do?
Hello, I have a problem. While creating a Telegram bot in Python (using the aiogram library) in the Pydroid android application, I got an error.
The code:
import config
import logging
from aiogram import Bot, Dispatcher, executor, types
logging.basicConfig(level=logging.INFO)
bot= Bot(token = config.Token)
dp = Dispatcher(bot)
@dp_message_handler()
async def echo(message: types.Message):
await message.answer(message.text)
if __name__ == '__main__':
executor.start_polling(dp, skip_updates=True)
Traceback (most recent call last):
File "/data/user/0/en.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in
start(fakepyfile,mainpyfile)
File "/data/user /0/en.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
exec(open(mainpyfile).read(), __main__.__dict__)
File "", line 6, in
File " /data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.8/logging/__init__.py", line 1997, in basicConfig
raise ValueError('Unrecognised argument(s): % s' % keys)
ValueError: Unrecognized argument(s): level
[Program finished]
Answer the question
In order to leave comments, you need to log in
Well, here it is written:
ValueError: Unrecognized argument(s): Level
File "", line 6, in
...
logging.basicConfig(Level=logging.INFO)
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question