Answer the question
In order to leave comments, you need to log in
Why does a syntax error occur?
My code
if message.text.startswith('Сменить ник'):
name = message.from_user.get_mention(as_html=True)
nik = str(message.text.split()[2])
await bot.send_message(message.chat.id, f'{name}, использование Сменить ник [ник]',
if str(nik) >= 16:
await bot.send_message(message.chat.id, f'⛔Извините но ник должен быть не менее 15 символов',
if str(nik) <= 15:
await bot.send_message(message.chat.id, f'⚡Ник {️nik}, Успешно установлен ',
parse_mode='html')
cursor.execute(f'UPDATE users SET user_name = {nik} WHERE user_id = ?')
connect.commit()
return
message:
Exited with error status 1
stderr:
File "script.py", line 6753 if str(nik) >= 16: ^ SyntaxError: invalid syntax
Answer the question
In order to leave comments, you need to log in
Presumably, count the spaces, if str(nik) >= 16:
it is not clear what it refers to, either to the upper condition, or an independent condition.
You have a parenthesis not closed in send_message() in a couple of places.
Well, yes, the condition str(something) >= number does not make any sense at all.
Make a full-width map without any containers, and a block with info position: absolute, and select its offset using calc()
At a glance, like this https://jsfiddle.net/webirus/ohugLhpv/
I think you can fix the little things and jambs yourself.
You can get the right border of the container via javascript, and position the desired part of the black box like this: right: the right border of the container. This will be as cross-browser friendly as possible. In general, there are often situations when you have to use javascript in a non-standard layout.
если я правильно понял, то поверх карты нужно расположить блок по центру. То я бы сделал так:
- внутри контейнера с картой создал бы div, с нужной шириной и высотой, а ценровал бы его margin: 0px auto;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question