Blender-FLIP-Fluids
Blender-FLIP-Fluids copied to clipboard
Baking Error: sqlite3.OperationalError: database is locked
We have received a report of an error during the beginning export stage of the baking process:
Python: Traceback (most recent call last):
File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\flip_fluids_addon\operators\bake_operators.py", line 220, in modal
bpy.ops.flip_fluid_operators.export_fluid_simulation("INVOKE_DEFAULT")
File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\modules\bpy\ops.py", line 130, in __call__
ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Python: Traceback (most recent call last):
File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\flip_fluids_addon\operators\export_operators.py", line 164, in execute
self._initialize_geometry_exporter(context)
File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\flip_fluids_addon\operators\export_operators.py", line 48, in _initialize_geometry_exporter
export.add_objects_to_geometry_exporter(self.geometry_exporter)
File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\flip_fluids_addon\export.py", line 413, in add_objects_to_geometry_exporter
geometry_exporter.initialize()
File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\flip_fluids_addon\objects\flip_fluid_geometry_exporter.py", line 107, in initialize
raise e
File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\flip_fluids_addon\objects\flip_fluid_geometry_exporter.py", line 98, in initialize
self._delete_geometry_export_objects_from_database()
File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\flip_fluids_addon\objects\flip_fluid_geometry_exporter.py", line 303, in _delete_geometry_export_objects_from_database
if not obj.skip_reexport and self._geometry_database.object_exists(obj):
File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\flip_fluids_addon\objects\flip_fluid_geometry_database.py", line 118, in object_exists
self._cursor.execute(cmd, (export_obj.name_slug,))
sqlite3.OperationalError: database is locked
This error may mean that the simulation database file that our addon uses is currently in use by another program and unable to be accessed by the addon. The cause of this could be that the file is opened elsewhere on the system such as by another Blender process or Windows process.
Here are some things to try:
- Close all instances of Blender, restart Blender, and try to bake the simulation.
- Restart your system, start up Blender and try to bake the simulation.
- Set the simulation cache directory to a new fresh location (In domain FLIP Fluid Cache panel) and try to bake the simulation.
It was reported that the above tips had not solved this issue. At the moment, the cause or solution to this error is not known. If you experiencing this error, please let us know either in this issue thread or at [email protected].
Just a note: I had exactly this issue (in a completely unrelated project) when for some reason sqlite3 sessions weren't all closed and then re-opened. Never saw it happen in FLIP Fluids though.
Thanks, that's good to know! I'll check around to see if we're closing the sessions correctly.
Update: we have not received another report of this error since the initial post until just recently. The artist was able to debug the issue and had found that a Mcafee Antivirus software was accessing the database file. The issue was solved by moving the cache to a location not monitored by the antivirus program. It could be possible that other antivirus software could also cause this problem.
This could also be the cause of Issue #617, but have not confirmed anything as of yet.
I'll be closing this issue, but if anyone else is encountering this error and this seems to not be caused by an antivirus software, let us know and we can re-open the issue.
I had this error consistently when I had the cache file written into a folder on a cifs / samba share in linux. Rebooting was not an option, so I moved the cache folder to /tmp/ hoping I can move it to the shared folder after baking.