I
I
Ilya Timofeev2020-06-01 20:18:28
Python
Ilya Timofeev, 2020-06-01 20:18:28

How to fix name 'account' is not defined or unresolved reference 'account'?

I'm writing code that, in my case, will ban/unban. But here (well, how could it be without this) there is a miracle thing called an error. Here is the code (respectively, without recorded logins and passwords). He does not know what an account is (as I understand it). What should I do to avoid this error?

from vk_api.longpoll import VkLongPoll, VkEventType
import vk_api.account
import vk_api
from datetime import datetime

login, password = "не_скажу", "не_скажу"
vk_session = vk_api.VkApi(login=login, password=password, app_id=2685278)
vk_session.auth(token_only=True)
account.unban(owner_id='578785088')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-06-02
@SoreMix

Where is this code from? There is no mention of account in vk_api
https://github.com/python273/vk_api/search?q=accou...
As well as unban (unless, of course, this is not your function)
https://github.com/python273/vk_api /search?q=unban...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question