azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Unexpected warning from batch.

Open xkszltl opened this issue 11 months ago • 7 comments

Describe the bug

See error log.

This is the latest regression in 2.81. IIRC 2.79 was fine.

Please forward to the owning team if it's not directly caused by cli.

Related command

az login --use-device-code

Errors

****/azure-cli/2.81.0/libexec/lib/python3.13/site-packages/azure/batch/models/_models.py:9067: SyntaxWarning: invalid escape sequence '\ '
  """The source port ranges to match for the rule. Valid values are '\ *' (for all ports 0 - 65535),
****/azure-cli/2.81.0/libexec/lib/python3.13/site-packages/azure/batch/models/_models.py:9235: SyntaxWarning: invalid escape sequence '\ '
  using brackets (for example abc[\ *] would match a file named abc*\ ). Note that both and / are

Environment Summary

azure-cli 2.81.0

xkszltl avatar Dec 04 '25 00:12 xkszltl

Thank you for opening this issue, we will look into it.

yonzhan avatar Dec 04 '25 00:12 yonzhan

Here are some similar issues that might help you. Please check if they can solve your problem.

  • #31789

Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

Solution 1:

azure-batch no longer contains the invalid escape sequence '\ ': https://github.com/Azure/azure-sdk-for-python/blob/5b185b229b07baf06b55e4885890ec5cd209cefa/sdk/batch/azure-batch/azure/batch/models/_models.py#L10044. It was fixed by https://github.com/Azure/azure-sdk-for-python/pull/40222. Azure CLI needs to adopt the latest: https://github.com/Azure/azure-cli/blob/89da35f0dcb70b1558346aea8c77f66ab95ca0ca/src/azure-cli/requirements.py3.Linux.txt#L6

Reference:

  • https://github.com/azure/azure-cli/issues/31789#issuecomment-3061103644

Solution 2:

Hi, it looks like we're not running into this issue using our latest azure-batch beta version 15.0.0b2 so we will be working on updating the CLI so it uses that version as well.

Reference:

  • https://github.com/azure/azure-cli/issues/31789#issuecomment-3091282158

Powered by issue-sentinel

github-actions[bot] avatar Dec 04 '25 00:12 github-actions[bot]

Here are some similar issues that might help you. Please check if they can solve your problem.

  • #31789
  • #31530

Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

Solution 1:

azure-batch no longer contains the invalid escape sequence '\ ': https://github.com/Azure/azure-sdk-for-python/blob/5b185b229b07baf06b55e4885890ec5cd209cefa/sdk/batch/azure-batch/azure/batch/models/_models.py#L10044. It was fixed by https://github.com/Azure/azure-sdk-for-python/pull/40222. Azure CLI needs to adopt the latest: https://github.com/Azure/azure-cli/blob/89da35f0dcb70b1558346aea8c77f66ab95ca0ca/src/azure-cli/requirements.py3.Linux.txt#L6

Reference:

  • https://github.com/azure/azure-cli/issues/31789#issuecomment-3061103644

Solution 2:

Hi, it looks like we're not running into this issue using our latest azure-batch beta version 15.0.0b2 so we will be working on updating the CLI so it uses that version as well.

Reference:

  • https://github.com/azure/azure-cli/issues/31789#issuecomment-3091282158

Powered by issue-sentinel

github-actions[bot] avatar Dec 04 '25 00:12 github-actions[bot]

Please refer to https://github.com/Azure/azure-cli/issues/32420

yonzhan avatar Dec 04 '25 00:12 yonzhan

Unrelated. This is the immediate output from azcli. No account has been selected at this point.

xkszltl avatar Dec 05 '25 23:12 xkszltl

I just got that warning too -- fresh install and just running az. I don't see it anymore though.

htelsiz avatar Jan 11 '26 05:01 htelsiz

2.83.0 seeing this for the first time with az account get-access-token

black-snow avatar Feb 04 '26 09:02 black-snow