Answer the question
In order to leave comments, you need to log in
Python and Vk_api - Error: AttributeError: partially initialized module 'vk_api' has no attribute 'VkApi'. How to solve the error?
Error code.
Traceback (most recent call last):
File "C:\Users\Dima\Desktop\Python\Scipts\Projects\vkbot\main.py", line 3, in
import vk_api
File "C:\Users\Dima\AppData\Local \Programs\Python\Python38-32\lib\site-packages\vk_api\__init__.py
", line 10, in
from .requests_pool import VkRequestsPool, vk_request_one_param_pool
File "C:\Users\Dima\AppData\Local\Programs\Python\ Python38-32\lib\site-packages\vk_api\requests_po
ol.py", line 14, in
from .execute import VkFunction
File "C:\Users\Dima\AppData\Local\Programs\Python\Python38-32\lib\ site-packages\vk_api\execute.py"
, line 11, in
from .utils import sjson_dumps
File "C:\Users\Dima\AppData\Local\Programs\Python\Python38-32\lib\site-packages\vk_api\utils.py",
line 21, in
from http.cookiejar import Cookie
File "C:\Users \Dima\AppData\Local\Programs\Python\Python38-32\lib\http\cookiejar.py", line 32, in
import copy
File "C:\Users\Dima\Desktop\Python\Scipts\Projects\vkbot\copy .py", line 36, in
vk_session = vk_api.VkApi(token='HIDDEN') # Group for testing
AttributeError: partially initialized module 'vk_api' has no attribute 'VkApi' (most likely due to a circular import)
# -*- coding: utf8 -*-
import vk_api
import vkapi
import random
import sqlite3
import array
import transliterate
import datetime
import sys
import os
import string
import requests
import copy
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question