Hello, Lately I got some messages from a couple of user who get the following error message when using my program:
OperationalError: unable to open database file I myself (and lots of others) have no problem at all. I searched a bit and found some with the same problem. They all solved it by making the database directory writable and not passing a tilde as path. I am 100% sure that the directory is writable, because my program creates a logfile in the same directory with no problems. And I'm also not passing a tilde as path. Here is some code that could help: # Get the application data folder # This will return: C:\Documents and Settings\user\Application Data\myapp PREFDIR = os.path.join(os.environ['APPDATA'], 'myapp') # Connect to the database def db_connect(): conn = sqlite3.connect(os.path.join(PREFDIR, 'myapp.db')) # This line gives the error conn.text_factory = str cursor = conn.cursor() return (conn, cursor) Anyone can help me with this? Cheers, Timo _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users