Skip to content

save_3d_views crashes kernel in Jupyter #601

@kroq-gar78

Description

@kroq-gar78

If running in Jupyter, cortex.export.save_3d_views causes the kernel to restart after completing. (I have not been able to reproduce this in an IPython or plain Python shell.) Minimum example below:

import tempfile, cortex, cortex.export
vol = cortex.Volume.random(subject='S1', xfmname='fullhead')
viewer_params={'open_browser': True, 'autoclose': True}
filenames = cortex.export.save_3d_views(
    vol, base_name=tempfile.mkdtemp(), list_angles=['left'],
    list_surfaces=['inflated'], viewer_params=viewer_params)

This is a long-standing issue I've had, which I've worked around by editing save_3d_views to return the web handle as well. So my hunch is that there's some race condition between the teardown of the web server and the completion of the notebook cell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions