pymol-open-source
pymol-open-source copied to clipboard
pymol.finish_launching() fails on macOS
By import pymol pymol.finish_launching() prompt error: 2019-04-19 10:52:44.576 Python[43192:3812618] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.' *** First throw call stack: ( 0 CoreFoundation 0x00007fff3b5c31fb __exceptionPreprocess + 171 1 libobjc.A.dylib 0x00007fff622ef942 objc_exception_throw + 48 2 CoreFoundation 0x00007fff3b5c8de2 +[NSException raise:format:arguments:] + 98 3 Foundation 0x00007fff3d6f1260 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193 4 Foundation 0x00007fff3d67fdb4 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 469 5 AppKit 0x00007fff38b0be56 -[NSApplication run] + 997 6 libqcocoa.dylib 0x000000010fa770ab qt_plugin_instance + 161931 7 QtCore 0x000000010e6ff55f _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 431 8 QtCore 0x000000010e704502 _ZN16QCoreApplication4execEv + 130 9 QtWidgets.so 0x000000010f3740e0 ZL23meth_QApplication_exec_P7_objectS0 + 80 10 Python 0x000000010be89df3 _PyMethodDef_RawFastCallKeywords + 236 11 Python 0x000000010be89493 _PyCFunction_FastCallKeywords + 44 12 Python 0x000000010bf1f168 call_function + 636 13 Python 0x000000010bf17da9 _PyEval_EvalFrameDefault + 7016 14 Python 0x000000010be8986e function_code_fastcall + 112 15 Python 0x000000010bf1f1dd call_function + 753 16 Python 0x000000010bf17da9 _PyEval_EvalFrameDefault + 7016 17 Python 0x000000010bf1fa6f _PyEval_EvalCodeWithName + 1835 18 Python 0x000000010be890c1 _PyFunction_FastCallDict + 441 19 Python 0x000000010bf180c0 _PyEval_EvalFrameDefault + 7807 20 Python 0x000000010be8986e function_code_fastcall + 112 21 Python 0x000000010bf1f1dd call_function + 753 22 Python 0x000000010bf17d90 _PyEval_EvalFrameDefault + 6991 23 Python 0x000000010be8986e function_code_fastcall + 112 24 Python 0x000000010bf1f1dd call_function + 753 25 Python 0x000000010bf17d90 _PyEval_EvalFrameDefault + 6991 26 Python 0x000000010be8986e function_code_fastcall + 112 27 Python 0x000000010be8a1f1 _PyObject_Call_Prepend + 150 28 Python 0x000000010be895a1 PyObject_Call + 136 29 Python 0x000000010bf86dd3 t_bootstrap + 71 30 Python 0x000000010bf4d540 pythread_wrapper + 25 31 libsystem_pthread.dylib 0x00007fff631676c1 _pthread_body + 340 32 libsystem_pthread.dylib 0x00007fff6316756d _pthread_body + 0 33 libsystem_pthread.dylib 0x00007fff63166c5d thread_start + 13 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6
Confirmed with PyMOL 2.3.1 (py27 and py37) on macOS 10.14.4
We might not be able to support pymol.finish_launching()
on macOS.
Running PyMOL in the main thread works fine:
import pymol
pymol.launch()
Confirmed with PyMOL 2.3.1 (py27 and py37) on macOS 10.14.4
We might not be able to support
pymol.finish_launching()
on macOS.Running PyMOL in the main thread works fine:
import pymol pymol.launch()
got next after running
import pymol
pymol.launch()
ValueError: invalid literal for int() with base 10: '/Users/alex/Library/Jupyter/runtime/kernel-561d3713-ec80-4753-a6e0-01ecef5ab4df.json'
I don't see why Jupyter files related, please check your installation.
I recommend you install with brew install pymol
.
I get the same error by using finish_launching(). pymol.launch() works for me. But then how to use python to put logic in? It seems any commands after pymol.launch() will not be executed. Will the 'finish_launching' problem be solved in Linux?