nglviewer / nglview

Jupyter widget to interactively view molecular structures and trajectories
http://nglviewer.org/nglview/latest/
Other
788 stars 132 forks source link

memory address error when rendering image from nglview #1097

Closed Fadelis98 closed 5 months ago

Fadelis98 commented 5 months ago

BUG Description:

I'm trying to save this image generaged by nglview: 1704786280639

However, I got an empty file if I just save it in this cell, while it become correct out of that cell !

image

How to repeat:

nglbug.zip

You can repeat the minimun case in the notebook

hainm commented 5 months ago

Dear @Fadelis98

It's an expected behavior due to asynchronous process. It's hard to explain so please just accept the fact. :D

Please see this also: https://github.com/nglviewer/nglview/blob/master/docs/FAQ.md#how-to-make-nglview-view-object-write-png-file

Fadelis98 commented 5 months ago

Dear @Fadelis98

It's an expected behavior due to asynchronous process. It's hard to explain so please just accept the fact. :D

Please see this also: https://github.com/nglviewer/nglview/blob/master/docs/FAQ.md#how-to-make-nglview-view-object-write-png-file

LOL, it's actually an unexpected 'expected behavior', and thanks for your answer.

hainm commented 5 months ago

Dear @Fadelis98 It's an expected behavior due to asynchronous process. It's hard to explain so please just accept the fact. :D Please see this also: https://github.com/nglviewer/nglview/blob/master/docs/FAQ.md#how-to-make-nglview-view-object-write-png-file

LOL, it's actually an unexpected 'expected behavior', and thanks for your answer.

yeah I know. I can't find any better way.