Skip to main content

Importing infinity loop

I'm learning to set up a SQLite database in Python using the sqlite3 module. I've saved my .py file and imported sqlite3 and I'm ready to go. I try to create a database and
AttributeError: module 'sqlite3' has no attribute 'connect'
I can't, for the life of me, figure out what I'm doing wrong. Google is my friend. I named my file sqlite3.py in an attempt to make it easy to find this tutorial later on. BIG MISTAKE. Naming it sqlite3.py meant that my file was trying to import itself 😒😒😒. Obviously there is no attribute 'connect' in my own file.

Note to self: Don't name files after software/languages/modules/etc. 

Stupid mistakes Meh!

Comments