You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PermissionError Traceback (most recent call last)
File d:\repo\ribasim\Ribasim\models\see.py:1
----> 1 model.write(toml_path)
File D:\repo\ribasim\Ribasim\python\ribasim\ribasim\model.py:302, in Model.write(self, filepath)
300 directory = filepath.parent
301 directory.mkdir(parents=True, exist_ok=True)
--> 302 self._save(directory, self.input_dir)
303 fn = self._write_toml(filepath)
305 context_file_writing.set({})
File D:\repo\ribasim\Ribasim\python\ribasim\ribasim\model.py:194, in Model._save(self, directory, input_dir)
192 db_path = directory / input_dir / "database.gpkg"
193 db_path.parent.mkdir(parents=True, exist_ok=True)
--> 194 db_path.unlink(missing_ok=True)
195 context_file_writing.get()["database"] = db_path
197 self.edge._save(directory, input_dir)
File d:\repo\ribasim\Ribasim\.pixi\envs\dev\Lib\pathlib.py:1342, in Path.unlink(self, missing_ok)
1337 """
1338 Remove this file or link.
1339 If the path is a directory, use rmdir() instead.
1340 """
1341 try:
-> 1342 os.unlink(self)
1343 except FileNotFoundError:
1344 if not missing_ok:
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'd:\\repo\\ribasim\\Ribasim\\generated_testmodels\\basic\\database.gpkg'
I haven't verified but I suspect this relates to the migrations PR #1764 which changed around how contextlib is used.
The text was updated successfully, but these errors were encountered:
visr
added
python
Relates to one of the Ribasim python packages
bug
Indicates an unexpected problem or unintended behavior
v1.0
Release!
labels
Sep 19, 2024
Working on #1830, it seemed like this was missing a closing. This makes
it more in line with db_utils.py.
It doesn't seem to be enough to fix that issue though.
---------
Co-authored-by: Maarten Pronk <[email protected]>
This used to work:
I haven't verified but I suspect this relates to the migrations PR #1764 which changed around how contextlib is used.
The text was updated successfully, but these errors were encountered: