- Notifications
You must be signed in to change notification settings - Fork22
Open
Labels
Description
Description
When runningpb.load_dataset(dataset="small_table", tbl_type="duckdb") on my Windows machine, I get the following error:
File"C:\Users\00113294\Projects\pointblank\pointblank\validate.py",line562,inload_datasetwithtempfile.TemporaryDirectory()astmp,ZipFile(data_path,"r")asz:~~~~~~~~~~~~~~~~~~~~~~~~~~~^^File"C:\Users\00113294\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\Lib\tempfile.py",line946,in__exit__self.cleanup()~~~~~~~~~~~~^^File"C:\Users\00113294\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\Lib\tempfile.py",line950,incleanupself._rmtree(self.name,ignore_errors=self._ignore_cleanup_errors)~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"C:\Users\00113294\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\Lib\tempfile.py",line930,in_rmtree_shutil.rmtree(name,onexc=onexc)~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^File"C:\Users\00113294\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\Lib\shutil.py",line790,inrmtreereturn_rmtree_unsafe(path,onexc)File"C:\Users\00113294\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\Lib\shutil.py",line629,in_rmtree_unsafeonexc(os.unlink,fullname,err)~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^File"C:\Users\00113294\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\Lib\tempfile.py",line905,inonexc_os.unlink(path)~~~~~~~~~~^^^^^^PermissionError: [WinError32]Theprocesscannotaccessthefilebecauseitisbeingusedbyanotherprocess:'C:\\Users\\00113294\\AppData\\Local\\Temp\\tmps3x_936b\\small_table.ddb'
According to Claude:
This is a Windows-specific issue with DuckDB file locking and temporary file cleanup. The error occurs because:
- File Handle Not Released: When
pb.load_dataset()creates a DuckDB database file in a temporary directory, the database connection isn't being properly closed before Python tries to clean up the temporary directory.- Windows File Locking: Windows is more strict about file locking than Unix systems - it won't allow deletion of files that have open handles, even if the process that opened them is trying to delete them.
Development environment
- Operating System: Windows
- Pointblank Version: 0.11.2