Parameter |
Description |
Value |
---|---|---|
name assistant-name |
Specifies the name of a Python script assistant, namely, a Python script name for a script assistant. |
The value must be the name of a script file for which the script assistant has been configured. |
You can run this command to view execution errors of all scripts or a specified script. According to the errors in the command output, you can modify the script.
# Display execution errors of all scripts.
<HUAWEI> display ops error
--------------------------------------------------------------------------------
test12.py:
Traceback (most recent call last):
File ".lib/frame.py", line 114, in <module>
ret = m.ops_execute(ops)
File "flash:$_user/test12.py", line 7, in ops_execute
status, err_context = ops.context.save(varName, value)
NameError: global name 'varName' is not defined
--------------------------------------------------------------------------------
test13.py:
Traceback (most recent call last):
File ".lib/frame.py", line 114, in <module>
ret = m.ops_execute(ops)
File "flash:$_user/test13.py", line 6, in ops_execute
status, err_log = ops.syslog("Syslog: Hello, World..", ops.CRITICAL, "syslog
")
AttributeError: 'module' object has no attribute 'syslog'
--------------------------------------------------------------------------------
Item |
Description |
---|---|
test12.py |
Python script file name. |
Traceback (most recent call last) |
Last call error. |
File ".lib/frame.py", line 114, in <module> |
Stack where an error occurs. |
File "flash:$_user/test12.py", line 7, in ops_execute |
Information about location where an error occurs, including the Python script name, number of line, and phase when the error occurs. |
status, err_context = ops.context.save(varName, value) |
Invalid contents. |
NameError |
A variable error. The system is attempting to access a variable that is not declared. |
AttributeError |
An attribute error. The system is attempting to access an unknown object attribute. |