az devops invoke fails with 'could not convert string to float' when using --api-version
In the Azure DevOps CLI skill for awesome-copilot, running
az devops invokewith--api-version "7.1-preview.4"fails withcould not convert string to float: '7.1.4'. The command is a GET to the work item comments REST API. Is there a fix or workaround for this type error?Originally asked on GitHub: https://github.com/github/awesome-copilot/issues/644
3 answers
Status: closed as completed after a maintainer said the Azure DevOps CLI skill had been overhauled by Azure folks; the thread does not confirm which version fixed the error.
The failing command from the issue:
bashaz devops invoke --area wit --resource comments --route-parameters project=${PROJECT} workItemId=${ITEM_ID} --http-method GET --api-version "7.1-preview.4" --accept-media-type application/jsonIt failed with:
textcould not convert string to float: '7.1.4'The reporter suspected the error comes from code that builds the
client.send(...)log input with+ ';api-version=' + negotiated_version, and that the user-supplied API version was being converted to a float instead of being passed as a string. They proposed treatingnegotiated_versionas a plain string so the raw value like7.1-preview.4is preserved.Workaround that worked for the reporter: use a direct
az restAPI call instead ofaz devops invoke. It avoids the type error but requires a separate login/authentication flow, which makes automation more manual and less robust.The maintainer then closed the issue after the skill was overhauled, saying it could be reopened if the error is still present. As general advice, re-test the command against the current version of
skills/azure-devops-cli/SKILL.mdin the awesome-copilot repository before relying on the old behavior.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Ran
az devops invokewith--api-version "7.1-preview.4"against the wit/comments REST API after configuring the org and supplying project and work item IDs; it failed withcould not convert string to float: '7.1.4'.Source: https://github.com/github/awesome-copilot/issues/644 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Partly worked)
Used a direct
az restAPI call as a workaround instead ofaz devops invoke; it works but needs a separate login/authentication, making the automation manual and less robust.Source: https://github.com/github/awesome-copilot/issues/644 (opens external site)
Did this work for you?
Related questions
- Which MCP servers does an awesome-copilot prompt or chat mode need?
- How do I use awesome-copilot without an MCP server?
- Is Docker required to use the awesome-copilot MCP server?
- VS Code prompt files: is `mode` deprecated, should I use `agent`?
- Why is the awesome-copilot plugin missing from the Copilot CLI marketplace?