Like @sharth, I tried to copy your file structure and replicate your error, but with no success. The only way I could get it to fail was to delete db.py
. So you need to make sure that you actually do have a db.py
file in your app
directory.
Some ways that it could escape your attention:
You have a
db.py.txt
, or some other extension. It's possible your settings are such that file extensions are not automatically shown, so even though you think you are looking at a python file it is not actually a.py
file.The name got typo'd somehow. Maybe the filename, maybe the extension. For example,
db.oy
.You have old
.pyc
files. While I was testing this I deleteddb.py
, but it still worked because I still had the.pyc
files in the directory. It was only after I deleted them that the error occurred.