Skip to content

JupyterLab widget crash with NPE in Output when using display() in python code #321

@sok82

Description

@sok82

Description

Dynamically added Output component crashes on rendering output with NPE when display_data output received

Exception stack trace is

[debug] Got new output for id=46dfb063-98cb-4eb0-8e4f-4c6005aea218 and phase=RUNNING(Thu Oct 17 2024 16:16:19 GMT+0300 (Moscow Standard Time))

widget.ts:154 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'widgets')
    at get widgets (widget.ts:154:1)
    at set future (widget.ts:206:1)
    at execute (OutputExecutor.ts:45:1)
    at OutputAdapter.execute (OutputAdapter.ts:105:1)
    at Output.tsx:155:1
    at commitHookEffectListMount (react-dom.development.js:23189:1)
    at commitPassiveMountOnFiber (react-dom.development.js:24965:1)
    at commitPassiveMountEffects_complete (react-dom.development.js:24930:1)
    at commitPassiveMountEffects_begin (react-dom.development.js:24917:1)
    at commitPassiveMountEffects (react-dom.development.js:24905:1)

KernelExecutor.ts:153 [debug] Got new output for id=46dfb063-98cb-4eb0-8e4f-4c6005aea218 and phase=COMPLETED (data : [{"output_type":"display_data","data":{"text/plain":"np.float64(0.5339950000000001)"},"metadata":{}}])(Thu Oct 17 2024 16:16:42 GMT+0300 (Moscow Standard Time))

In case when output is already present in the component tree - everything works fine

Reproduce

...Investigating

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions