title | titleSuffix | description | ms.service | author | ms.author | ms.topic | ms.date |
---|---|---|---|---|---|---|---|
Troubleshoot CLI parsing failures |
Azure Digital Twins |
Learn how to diagnose and resolve parsing failures with the Azure Digital Twins CLI command set. |
digital-twins |
baanders |
baanders |
troubleshooting |
03/31/2022 |
This article describes causes and resolution steps for various "parse failed" errors while running az dt commands in the Azure CLI.
While attempting to run select az dt
commands in an Azure CLI environment, you receive an error indicating that the command wasn't parsed correctly. The error message might include the words parse failed or failed to parse, or partial text from your command may be marked as unrecognized arguments.
Some az dt
commands use special characters that have to be escaped for proper parsing in certain shell environments. It is possible that some special character in your CLI command needs to be escaped for it to be parsed in the shell that you're using.
Use the full error message text to help you determine which character is causing an issue. Then, try escaping instances of this character with a backslash or a backtick. For a list of some specific characters that need to be escaped in certain shells, see Use special characters in different shells.
If you're encountering the parsing issue while passing inline JSON into a command (like az dt model create or az dt twin create), check whether the command allows you to pass in a file instead. Many of the commands that support inline JSON also support input as a file path, which can help you avoid shell-specific text requirements.
Not all shells have the same special character requirements, so you can try running the command in a different shell type (some options are the Cloud Shell Bash environment, Cloud Shell PowerShell environment, local Windows CMD, local Bash window, or local PowerShell window).
Read more about the CLI for Azure Digital Twins: