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
blenderkit addon: Error: Failed to remove existing staging directory, consider manually removing C:\Users\agajdosi\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderkit\../../addons_updates/blenderkit_updater\update_staging
Traceback (most recent call last):
File "C:\Users\agajdosi\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\blenderkit\addon_updater.py", line 1109, in deep_merge_directory
File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\python\lib\shutil.py", line 739, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\python\lib\shutil.py", line 617, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\python\lib\shutil.py", line 615, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\agajdosi\\AppData\\Roaming\\Blender Foundation\\Blender\\3.1\\scripts\\addons\\blenderkit\\../../addons_updates/blenderkit_updater\\update_staging\\source.zip'
blenderkit addon: Wrote out updater JSON settings with content:
blenderkit addon: {'last_check': '2022-05-04 13:18:11.589117', 'backup_date': 'May-4-2022', 'update_ready': True, 'ignore': False, 'just_restored': False, 'just_updated': True, 'version_text': {'link': 'https://api.github.com/repos/BlenderKit/blenderkit/zipball/v3.1.3', 'version': (3, 1, 3)}}
Restart blender to reload addon and complete update
blenderkit addon: blenderkit updater: Running post update callback
Updater returned successful
It seems to me, that zip file is not being closed which is the reason for the error. I have tried to call the function zipfile.ZipFile(self._source_zip, "r") which opens the file via with - as statement in the def unpack_staged_zip(self, clean=False): , which solved the issue for us:
Hi @agajdosi so sorry for the crazy long delay here, I somehow missed the notification. Would love to have this pr! If you don't get to it, I certainly will as indeed - using a with context manager is definitely the right way to do this.
TheDuckCow
added a commit
to Moo-Ack-Productions/MCprep
that referenced
this issue
Aug 11, 2022
From our error logs in BlenderKit addon:
It seems to me, that zip file is not being closed which is the reason for the error. I have tried to call the function
zipfile.ZipFile(self._source_zip, "r")
which opens the file viawith - as
statement in thedef unpack_staged_zip(self, clean=False):
, which solved the issue for us:Would be glad to create a PR :)
The text was updated successfully, but these errors were encountered: