This is autogenerated. Please review and update as needed.
Describe the bug
When remove ml extension, pvectorc.cp310-win32.pyd file can't be deleted.
After this command fails, az extension list raises error:
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/__init__.py", line 308, in get_extension_modname
AssertionError: Expected 1 module to load starting with 'azext_': got []
After some investigation, I think pyrsistent might be the reason.
Create a new virtual env and install pyrsistent. This script also fails with same error:
import os
import pyrsistent
os.remove('venv/Lib/site-packages/pvectorc.cp310-win_amd64.pyd')
Once pyrsistent is imported, this file can't be deleted.
I guess the file is opened by Python, but I can't find a way to release it.
In ml extension, pyrsistent is imported by jsonschema, and jsonschema is used in azext_mlv2\manual\vendored_curated_sdk\azure\ai\ml\_utils\_data_utils.py:
from jsonschema import Draft7Validator, ValidationError
from jsonschema.exceptions import best_match
If these two lines are not executed when cli load ml extension, the issue could be fixed.
Workaround
Manually delete C:\Users\hanglei\.azure\cliextensions/ml folder to remove extension.
Command Nameaz extension remove
Errors:
Failed to delete 'C:\Users\kk\.azure\cliextensions\ml': [WinError 5] Access is denied: 'C:\\Users\\kk\\.azure\\cliextensions\\ml\\pvectorc.cp310-win32.pyd'. Retrying ...
Failed to delete 'C:\Users\kk\.azure\cliextensions\ml': [WinError 5] Access is denied: 'C:\\Users\\kk\\.azure\\cliextensions\\ml\\pvectorc.cp310-win32.pyd'. Retrying ...
Failed to delete 'C:\Users\kk\.azure\cliextensions\ml': [WinError 5] Access is denied: 'C:\\Users\\kk\\.azure\\cliextensions\\ml\\pvectorc.cp310-win32.pyd'. Retrying ...
Failed to delete 'C:\Users\kk\.azure\cliextensions\ml': [WinError 5] Access is denied: 'C:\\Users\\kk\\.azure\\cliextensions\\ml\\pvectorc.cp310-win32.pyd'. You may try to delete it manually.
This is autogenerated. Please review and update as needed.
Describe the bug
When remove
ml
extension,pvectorc.cp310-win32.pyd
file can't be deleted.After this command fails,
az extension list
raises error:After some investigation, I think
pyrsistent
might be the reason. Create a new virtual env and installpyrsistent
. This script also fails with same error:Once
pyrsistent
is imported, this file can't be deleted. I guess the file is opened by Python, but I can't find a way to release it.In
ml
extension,pyrsistent
is imported byjsonschema
, andjsonschema
is used inazext_mlv2\manual\vendored_curated_sdk\azure\ai\ml\_utils\_data_utils.py
:If these two lines are not executed when cli load ml extension, the issue could be fixed.
Workaround
Manually delete
C:\Users\hanglei\.azure\cliextensions/ml
folder to remove extension.Command Name
az extension remove
Errors:
To Reproduce:
Expected Behavior
Environment Summary
Additional Context