Help in this problem

C:\Users\USER\AppData\Local\Programs\Python\Python312\python.exe C:\Users\USER\Desktop\code\datetime.py
Traceback (most recent call last):
File “C:\Users\USER\Desktop\code\datetime.py”, line 1, in
import sqlite3
File “C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\sqlite3_init_.py”, line 57, in
from sqlite3.dbapi2 import *
File “C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\sqlite3\dbapi2.py”, line 23, in
import datetime
File “C:\Users\USER\Desktop\code\datetime.py”, line 8, in
conn = sqlite3.connect(‘sqlite3.bd’)
^^^^^^^^^^^^^^^
AttributeError: partially initialized module ‘sqlite3’ has no attribute ‘connect’ (most likely due to a circular import)

Process finished with exit code 1

You have to change the name of your script from datetime.py to something else.

3 Likes

Please read: