D
D
darkasha2021-07-17 20:37:26
Python
darkasha, 2021-07-17 20:37:26

NameError: name 'phone' is not defined?

Traceback (most recent call last):
File "C:/Users/arkasha/AppData/Local/Temp/Rar$DRa7804.22900/edefrog/main.py", line 13, in
qiwi = QApi(phone=phone, token= qiwi_token)
NameError: name 'phone' is not defined

Process finished with exit code 1


code itself:

qiwi = QApi(phone=phone, token=qiwi_token)

bot = Bot(telegram_token, parse_mode=ParseMode.HTML)
dp = Dispatcher(bot, storage=MemoryStorage())

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alan Gibizov, 2021-07-17
@phaggi

Yes, NameError: name 'phone' is not defined.

M
mkone112, 2021-07-17
@mkone112

name 'phone' is not defined

D
Dmitry Prilepsky, 2021-07-18
@HartX

You don't have a phone variable, a NameError occurs when the variable used is not defined. Make sure a variable with that name exists, check that there are no errors in the name and check the indentation

R
RusiDev, 2021-07-23
@RusiDev

Before "qiwi = QApi(phone=phone, token=qiwi_token)" add: Naturally, instead of "+79991234567" the desired number
phone = '+79991234567'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question