Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OperationalError: (OperationalError) unable to open database file None None

Tags:

Trying to format a database using SQLAlchemy but when I run create_all on the metadata, I get the above error. I created the engine using the following path for user Tyre77:

engine = create_engine('sqlite:////tyre77/OmniCloud/database.db') 

I've walked through and there is a file 'database.db' at that path, but perhaps I typed it wrong?

like image 683
Chris Avatar asked Sep 04 '11 22:09

Chris


1 Answers

You mention that it is a path to user tyre77 on OS X, so shouldn't that be sqlite:////Users/tyre77/OmniCloud/database.db?

Also, three slashes for relative paths, four for absolute paths.

like image 153
tuomur Avatar answered Oct 07 '22 22:10

tuomur