Splunk SOAR (f.k.a. Phantom)

Playbook run results in the "user parameter must be of type string" error

Splunk Employee
Splunk Employee
This article describes a workaround when you run a playbook and see the "user parameter must be of type string" error, but the parameter is a string.

An example of this error is shown below:

TypeError: Error in phantom.prompt(): user parameter must be of type string

An example call that generates this error is shown below:

phantom.prompt(user="support", message="Verify incident details", respond_in_mins=30, name="prompt_1", callback=prompt_1_callback)

The issue can be caused by an import that changes what is considered a string, such as:

import unicode_literals

To resolve the issue, specify that the string values are strings using str(). For example:

phantom.prompt(user=str("support"), message=str("Verify incident details"), respond_in_mins=30, name=str("prompt_1"), callback=prompt_1_callback)
Labels (1)
Tags (2)
0 Karma
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!