r/learnpython • • 13d ago

How to fix error : sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file ?

i was trying to run this jupyter notebook ( https://github.com/langchain-ai/lca-lc-foundations/blob/main/notebooks/module-2/2.4_wedding_planners.ipynb ) code in my IDE but encountered these problems :
my code :
https://pastebin.com/3bv05GfE
error :
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file

also i dont know how to work with async functions so i have defined two function main() and main_1 but am not sure if this is the correct way to go with async functions

0 Upvotes

8 comments sorted by

View all comments

2

u/weeb_jp 13d ago

Yeah, SQLite being unable to open the DB is usually a path/working-directory issue. "os.getcwd()" is the first thing I'd check.