nbclient icon indicating copy to clipboard operation
nbclient copied to clipboard

"transient" set to None explicitly breaks execute

Open callmephilip opened this issue 11 months ago • 1 comments

I am trying to get to the bottom of this issue with deno kernel and so I managed to track it down to the following:

 display_id = content.get("transient", {}).get("display_id", None)

throws when receiving message with the following content (note explicit None which causes the issue):

{'execution_count': 7, 'data': {'text/plain': '\x1b[32m"2.29.4"\x1b[39m'}, 'metadata': {}, 'transient': None}

Should this be addressed in nbclient or is this an issue with the kernel?

callmephilip avatar Dec 12 '24 16:12 callmephilip

a simple workaround would be something along these lines:

transient = content.get("transient", {})
display_id = transient.get("display_id", None) if transient else None

callmephilip avatar Dec 12 '24 16:12 callmephilip