I am writing a script in python to update Jira issues with a dynamic comment but I am getting the following error:
AttributeError: 'bytes' object has no attribute 'dumps'
This is part of the code that is failing:
mycomment = "Test comment"
issue_comment = json.dumps( {
"body": {
"content": [
{
"content": [
{
"text": mycomment,
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
}
})Can you help me with how to pass a variable in this python dictionary?