Answer the question
In order to leave comments, you need to log in
sqlite3 error?
An error occurs on startup:
_partially initialized module 'sqlite3' has no attribute 'connect' (most likely due to a circular import)
import sqlite3 as sq
with sq.connect('users.db') as con:
cur = con.cursor()
cur.execute("""CREATE TABLE IF NOT EXISTS users(
chat_id INTEGER,
user_id INTEGER,
first_name TEXT,
second_name TEXT,
nick TEXT,
money INTEGER DEFAULT 0
)""")
Answer the question
In order to leave comments, you need to log in
Is this all code?
Your piece of code runs and works for me.
What is the name of your Python script? The case is not sqlite3?
The directory with the script should not contain files named sqlite3.py
It seems you have created a module named sqlite3? It is he who is imported instead of the desired one, rename the file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question