brightway-lca / brightway2-data

Tools for the management of inventory databases and impact assessment methods. Part of the Brightway LCA framework.
https://docs.brightway.dev/
BSD 3-Clause "New" or "Revised" License
8 stars 21 forks source link

All projects default to read-only, enable_writes is powerless #43

Closed aleksandra-kim closed 7 years ago

aleksandra-kim commented 8 years ago

Original report by Pascal Lesage (Bitbucket: MPa, ).


All projects (even new projects) default to read_only. Deleting the write_lock does not help, it is replaced at every time the project is set to current.

Here is the error message upon attempting enable_writes:

C:\bw2-python\envs\bw2\lib\site-packages\bw2data\project.py in enable_writes(self, force) 219 """Enable writing for the current project.""" 220 if force: --> 221 os.remove(os.path.join(self.dir, "write-lock")) 222 self.read_only = not self._lock.acquire(timeout = 0.05) 223 if not self.read_only: PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\pasca\AppData\Local\pylca\Brightway3\copy-of-ecoinvent_32_cutoff_US.546fa5af9888b4304f69c885ebe82de7\write-lock'

aleksandra-kim commented 7 years ago

Original comment by Chris Mutel (Bitbucket: cmutel, GitHub: cmutel).


Write-lock is being removed in 2.4 (in progress)