-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NSInternalInconsistencyException Error #14
Comments
@Ssingh1997, no clue what The segfaulting you get in docker is probably due not having a display server. Check below how to start one using And see here how I got it running on Streamlit Community Cloud, another headless machine. |
I get a similar error when attempting to use the example code.
This is with
|
got similar error on mac You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://192.168.6.17:8501
2023-10-25 19:20:32.191 python[28750:16576785] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x0000000198acf154 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x00000001985ee4d4 objc_exception_throw + 60
2 CoreFoundation 0x0000000198af83a0 _CFBundleGetValueForInfoKey + 0
3 AppKit 0x000000019bc9e638 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 320
4 AppKit 0x000000019bc8c90c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 816
5 AppKit 0x000000019bc8c5d0 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 48
6 libvtkRenderingOpenGL2-9.2.dylib 0x000000016c6fbe4c _ZN20vtkCocoaRenderWindow13CreateAWindowEv + 1488
7 libvtkRenderingOpenGL2-9.2.dylib 0x000000016c78dd5c _ZN21vtkOpenGLRenderWindow5StartEv + 40
8 libvtkRenderingOpenGL2-9.2.dylib 0x000000016c6fc4c4 _ZN20vtkCocoaRenderWindow5StartEv + 20
9 libvtkRenderingUI-9.2.dylib 0x00000001561d9488 _ZN30vtkCocoaRenderWindowInteractor10InitializeEv + 64
10 libvtkRenderingCore-9.2.dylib 0x0000000156f590c0 _ZN15vtkRenderWindow6RenderEv + 148
11 libvtkRenderingOpenGL2-9.2.dylib 0x000000016c7901d4 _ZN21vtkOpenGLRenderWindow6RenderEv + 112
12 vtkRenderingOpenGL2.cpython-310-dar 0x000000016c94e850 _ZL30PyvtkOpenGLRenderWindow_RenderP7_objectS0_ + 104
13 python3.10 0x00000001007d6bb0 cfunction_call + 96
14 python3.10 0x00000001007746c8 _PyObject_MakeTpCall + 136
15 python3.10 0x00000001008a7f78 call_function + 380
16 python3.10 0x000000010089fd80 _PyEval_EvalFrameDefault + 23352
17 python3.10 0x000000010089898c _PyEval_Vector + 392
18 python3.10 0x00000001008a7e80 call_function + 132
19 python3.10 0x000000010089ee84 _PyEval_EvalFrameDefault + 19516
20 python3.10 0x000000010089898c _PyEval_Vector + 392
21 python3.10 0x00000001007785dc method_vectorcall + 124
22 python3.10 0x00000001008a7e80 call_function + 132
23 python3.10 0x000000010089e4b0 _PyEval_EvalFrameDefault + 17000
24 python3.10 0x000000010089898c _PyEval_Vector + 392
25 python3.10 0x00000001008a7e80 call_function + 132
26 python3.10 0x000000010089ee84 _PyEval_EvalFrameDefault + 19516
27 python3.10 0x000000010089898c _PyEval_Vector + 392
28 python3.10 0x00000001008a7e80 call_function + 132
29 python3.10 0x000000010089ee84 _PyEval_EvalFrameDefault + 19516
30 python3.10 0x000000010089898c _PyEval_Vector + 392
31 python3.10 0x000000010089abf0 _PyEval_EvalFrameDefault + 2472
32 python3.10 0x000000010089898c _PyEval_Vector + 392
33 python3.10 0x00000001007785dc method_vectorcall + 124
34 python3.10 0x00000001008a7e80 call_function + 132
35 python3.10 0x000000010089e4b0 _PyEval_EvalFrameDefault + 17000
36 python3.10 0x000000010089898c _PyEval_Vector + 392
37 python3.10 0x00000001008a7e80 call_function + 132
38 python3.10 0x000000010089e4b0 _PyEval_EvalFrameDefault + 17000
39 python3.10 0x000000010089898c _PyEval_Vector + 392
40 python3.10 0x00000001008a7e80 call_function + 132
41 python3.10 0x000000010089e430 _PyEval_EvalFrameDefault + 16872
42 python3.10 0x000000010089898c _PyEval_Vector + 392
43 python3.10 0x0000000100892d78 builtin_exec + 304
44 python3.10 0x00000001007d73e8 cfunction_vectorcall_FASTCALL + 88
45 python3.10 0x00000001008a7e80 call_function + 132
46 python3.10 0x000000010089e430 _PyEval_EvalFrameDefault + 16872
47 python3.10 0x000000010089898c _PyEval_Vector + 392
48 python3.10 0x00000001008a7e80 call_function + 132
49 python3.10 0x000000010089ee84 _PyEval_EvalFrameDefault + 19516
50 python3.10 0x000000010089898c _PyEval_Vector + 392
51 python3.10 0x00000001007786e4 method_vectorcall + 388
52 python3.10 0x000000010089abf0 _PyEval_EvalFrameDefault + 2472
53 python3.10 0x000000010089898c _PyEval_Vector + 392
54 python3.10 0x00000001008a7e80 call_function + 132
55 python3.10 0x000000010089ee84 _PyEval_EvalFrameDefault + 19516
56 python3.10 0x000000010089898c _PyEval_Vector + 392
57 python3.10 0x00000001008a7e80 call_function + 132
58 python3.10 0x000000010089ee84 _PyEval_EvalFrameDefault + 19516
59 python3.10 0x000000010089898c _PyEval_Vector + 392
60 python3.10 0x00000001007786e4 method_vectorcall + 388
61 python3.10 0x0000000100992e34 thread_run + 172
62 python3.10 0x000000010091a32c pythread_wrapper + 48
63 libsystem_pthread.dylib 0x0000000198977fa8 _pthread_start + 148
64 libsystem_pthread.dylib 0x0000000198972da0 thread_start + 8
)
libc++abi: terminating due to uncaught exception of type NSException
[1] 28750 abort streamlit run pyvista_test.py with the simple code: def demo():
# Initialize a plotter object
plotter = pv.Plotter(window_size=[400, 400])
# Create a mesh with a cube
mesh = pv.Cube(center=(0, 0, 0))
# Add some scalar field associated to the mesh
mesh['myscalar'] = mesh.points[:, 2]*mesh.points[:, 0]
# Add mesh to the plotter
plotter.add_mesh(mesh, scalars='myscalar', cmap='bwr', line_width=1)
# Final touches
plotter.view_isometric()
plotter.add_scalar_bar()
plotter.background_color = 'white'
# Pass a key to avoid re-rendering at each time something changes in the page
stpyvista(plotter, key="pv_cube") |
I am receiving a similar error on mac os v14.2.1:
|
same thing here with example code on m2 mac, python 3.11.9, PyVista 0.43.8, stpyvista 0.0.17. |
@edsaac Could you please help us out? Has somebody solved the problem? |
This issue appears to be iOS specific so I am not able to replicate it. iOS was just recently added as a supported platform to CPython (PEP 719), so maybe test using the current candidate release for Python 3.13? Of course, if someone finds a solution to the problem, lmk and I will patch |
Tried using off screen rendering by setting pv.OFF_SCREEN = True and plotter.off_screen = True, but didn't work. I also tried forcing rendering on the main thread and using Streamlit's st.cache_resource to ensure plotter creation on the main thread. Someone with more resources could maybe try a new render method instead of panel. |
I cloned this repo and tried to run the code via streamlit but keep running into this issue on my Mac:
2023-09-04 11:32:27.017 Python[63562:3191072] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
Streamlit will just disconnect
I tried to do a workaround by using docker but I run into a seg fault.
The text was updated successfully, but these errors were encountered: