Check if there is another file named db.py somewhere else in your project or Python environment that might be causing a conflict.
In your export.py, add these lines to see which db.py file Python is actually importing
import db
print(db._file_)
Make sure there are no circular imports — for example, db.py should not import export.py or anything that imports export.py.
Restart your Streamlit app and your editor to clear any caches or old imports.