-1

I'm trying to access the history of chrome browser which is a SQLite file. My code was working fine but recently I'm facing this error- sqlite3.OperationalError: database is locked

Is there any solution?

Error message

Dadep
  • 2,796
  • 5
  • 27
  • 40
zeroFighter
  • 123
  • 2
  • 13
  • 3
    Possible duplicate of [Python SQLite: database is locked](https://stackoverflow.com/questions/2740806/python-sqlite-database-is-locked) – Dadep Apr 26 '18 at 12:21

2 Answers2

1

Set the timeout parameter:

connection = sqlite.connect('name.db', timeout=1)
Aniket Bote
  • 3,456
  • 3
  • 15
  • 33
0

Chrome locks the database when it is open. I have closed it and its started working.

zeroFighter
  • 123
  • 2
  • 13