B
B
bugmenot22020-05-23 11:18:59
Python
bugmenot2, 2020-05-23 11:18:59

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)


All connected modules
# -*- 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


Did a system rollback, removed the vk_api module. I thought because of Python itself, I decided to reinstall it later, it did not help. Personally, I think vk_api.py is to blame here. I've already given up and don't know the solution.

The day before the error, I decided to reinstall pip via the console. An error came out, did not betray the value. Unfortunately, I did not copy the error.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question