pysqlite2._sqlite.OperationalError: unable to o...


D:\login>python weibo_login.py
Traceback (most recent call last):
  File "weibo_login.py", line 40, in <module>
    login();
  File "weibo_login.py", line 25, in login
    cookiejar = sqlite2cookie(r'C:/Users/xxx/Library/Application Support/Google/
Chrome/Default/Cookies')
  File "weibo_login.py", line 5, in sqlite2cookie
    con = sqlite.connect(filename)
pysqlite2._sqlite.OperationalError: unable to open database file


原因: chrome cookies路径不正确 

C:/Users/xxx/Library/Application Support/Google/Chrome/Default/Cookies

修改为chrome cookies正确路径即可解决此问题。

我的chrome cookies 路径:C:/Users/xxx/AppData/Local/Google/Chrome/User Data/Default/Cookies

注意:xxx是win 7的用户名


你可能感兴趣的:(Cookies,File,database,open,sqlite2)