The issue is the way the Windows path string is written in Python.
In Python, backslashes in strings are escape characters, so this:
conn = sqlite3.connect(C:\Users\aussi\OneDrive\Documents\Google Colab\SQL BDMs.rmgc)
will be parsed incorrectly and also lacks quotes around the path (it must be a string).
Use one of these correct forms instead:
- Raw string literal:
conn = sqlite3.connect(r"C:\Users\aussi\OneDrive\Documents\Google Colab\SQL BDMs.rmgc")
- Escape backslashes properly:
conn = sqlite3.connect("C:\\Users\\aussi\\OneDrive\\Documents\\Google Colab\\SQL BDMs.rmgc")
- Use forward slashes (Python accepts them on Windows):
conn = sqlite3.connect("C:/Users/aussi/OneDrive/Documents/Google Colab/SQL BDMs.rmgc")
Also ensure that the file actually exists at that path and that OneDrive sync is not interfering. If running in a different environment (for example, a remote Jupyter server), that local Windows path will not be accessible and the database file must be on a path visible to the Jupyter runtime.
References: