When extracting zip archives, os.mkdir() could raise [Errno 17] EEXIST in two places: 1. makedirs() - A directory might already exist between the path_exists check and the os.mkdir() call, or be created by a prior extraction step. 2. _extract_member() - makedirs() may have already created a directory when building parent paths for a file entry, and then a separate directory entry for the same path triggers os.mkdir() again. Wrap both os.mkdir() calls in try/except OSError to handle this gracefully. Co-authored-by: Richard Taylor <RT@MacBookPro.lan> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This /lib folder contains:
-
mip.install('github:jonnor/micropython-zipfile')
-
mip.install("aiohttp") # easy websockets
-
https://github.com/micropython/micropython-lib/blob/master/micropython/aiorepl/aiorepl.py version 0.2.2 # for asyncio REPL, allowing await expressions
-
https://github.com/micropython/micropython-lib/blob/master/python-stdlib/base64/base64.py version 3.3.6 # for nostr
-
https://github.com/micropython/micropython-lib/blob/master/python-stdlib/binascii/binascii.py version 2.4.1 # for base64.py
-
https://github.com/micropython/micropython-lib/blob/master/python-stdlib/logging/logging.py version 0.6.2 # for About app
-
https://github.com/micropython/micropython-lib/blob/master/python-stdlib/shutil/shutil.py version 0.0.5 # for rmtree()
-
https://github.com/micropython/micropython-lib/blob/master/python-stdlib/unittest/unittest/__init__.py version 0.10.4 # for testing (also on-device)