Open SophiaZhang-eaton opened 3 weeks ago
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-iot-cli-triage.
Hi @SophiaZhang-eaton , how are you using the command? Only seeing the error here, not the form of input that caused it.
I am able to repro the issue using a directory for --file path= for example "--file path=." -- The command path is expecting a file path value, not a directory path.
Describe the bug
when send "az iot du update init v5" command, it will show permission denied
Related command
az iot du update init v5
Errors
[Errno 13] Permission denied: '.'
Issue script & Debug output
Command group 'iot du update init' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus Skipping processing of 'company.', input format is key=value | key='value value'. No value assigned to key 'manufacturer', input format is key=value | key='value value'. Skipping processing of '-230223.signed', input format is key=value | key='value value'. No value assigned to key 'path', input format is key=value | key='value value'. Skipping processing of '-230223.signed', input format is key=value | key='value value'. No value assigned to key 'path', input format is key=value | key='value value'. The command failed with an unexpected error. Here is the traceback: [Errno 13] Permission denied: '.' Traceback (most recent call last): File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 664, in execute File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, in _run_jobs_serially File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 701, in _run_job File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler File "C:\Users.azure\cliextensions\azure-iot\azext_iot\deviceupdate\commands_update.py", line 387, in manifest_init_v5 assembled_file_metadata = DeviceUpdateDataManager.calculate_file_metadata(assembled_file["path"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users.azure\cliextensions\azure-iot\azext_iot\deviceupdate\providers\base.py", line 259, in calculate_file_metadata with io.open(file_pure_path.as_posix(), "rb") as file_io: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied: '.' To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
Expected behavior
should be create manifest file
Environment Summary
azure-cli 2.60.0
core 2.60.0 telemetry 1.1.0
Extensions: azure-iot 0.23.1
Dependencies: msal 1.28.0 azure-mgmt-resource 23.1.0b2
Additional context
No response