#653·watchdog

在使用看门狗与 opencv 结合时,Python 出现分段错误 (线程)

作者: mluerig创建于 2020年3月12日更新于 2026年8月27日

(pp) moritz@Marias-MacBook-Air ~ % Python -Xfaulthandler Python 3.7.6 (default, Jan 8 2020, 13:42:34) [Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import faulthandler >>> import cv2, copy, os >>> import phenopype as pp >>> proj = pp.load_project(r"/Users/moritz/Desktop/pp_test/stickle_stained/phenopype/stickle1/project.data") >>> image = proj.dirpaths[0] >>> image, df = pp.load_image(proj.filepaths[0], df=True, meta=False) >>> faulthandler.enable() >>> mon = pp.utils_lowlevel._yaml_file_monitor(os.path.join(proj.dirpaths[0],'pype_config_v1.yaml')) >>> while True: ... config = copy.deepcopy(mon.content) ... pp.show_image(image, config) ... <FileModifiedEvent: src_path='/Users/moritz/Desktop/pp_test/stickle_stained/phenopype/stickle1/data/0__00_stickle_reference/pype_config_v1.yaml'> Fatal Python error: Segmentation fault Current thread 0x000070000ccdd000 (most recent call first): File "/Users/moritz/Desktop/pp_test/phenopype/phenopype/utils_lowlevel.py", line 371 in on_update File "/Users/moritz/opt/anaconda3/envs/pp/lib/python3.7/site-packages/watchdog/events.py", line 330 in dispatch File "/Users/moritz/opt/anaconda3/envs/pp/lib/python3.7/site-packages/watchdog/events.py", line 452 in dispatch File "/Users/moritz/opt/anaconda3/envs/pp/lib/python3.7/site-packages/watchdog/observers/api.py", line 369 in dispatch_events File "/Users/moritz/opt/anaconda3/envs/pp/lib/python3.7/site-packages/watchdog/observers/api.py", line 196 in run File "/Users/moritz/opt/anaconda3/envs/pp/lib/python3.7/threading.py", line 926 in _bootstrap_inner File "/Users/moritz/opt/anaconda3/envs/pp/lib/python3.7/threading.py", line 890 in _bootstrap Thread 0x000070000c757000 (most recent call first): File

内容来源: gorakhargosh/watchdog