Код:
def about_me(message):
user_type = message.text[1:2]
user_id = int(message.text[2:])
...
return user_type, user_id
...
def obnoviti2(message, user_type, user_id):
...
user_type, user_id = about_me(message)
obnoviti2(user_type, user_id)
Если не пишу message выходит ошибка:
Traceback (most recent call last):
File "work.py", line 1293, in
user_type, user_id = about_me()
TypeError: about_me() missing 1 required positional argument: 'message'
А если пишу то:
Traceback (most recent call last):
File "work.py", line 1293, in
user_type, user_id = about_me(message)
NameError: name 'message' is not defined