Repository navigation
Julia crashes (Segmentation fault) when using tab completion with PythonCall #713
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Activity
Ah this was fixed a while ago but is only just released. Update to PythonCall 0.9.29 and it should be fixed.
I get a similar error. I’m not even using tab completion. The error happens while I’m typing in the REPL. My error message is similar to this one:
julia> using PythonCall (@v1.12) pkg> status PythonCall Status `~/.julia/environments/v1.12/Project.toml` [6099a3de] PythonCall v0.9.29 julia> re = pyimport("re") Python: <module 're' from '/home/me/.julia/environments/v1.12/.CondaPkg/.pixi/envs/default/lib/python3.14/re/__init__.py'> julia> words = re.Fatal Python error: _Py_CheckRecursiveCall: Unrecoverable stack overflow (used 705193 kB) while calling a Python object Python runtime state: initialized Current thread 0x00007fb3b8b31180 [julia] (most recent call first): <no Python frame> [30574] signal 6 (-6): Aborted in expression starting at REPL[4]:1 unknown function (ip: 0x7fb3b8be995c) at /lib/x86_64-linux-gnu/libc.so.6 gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) fatal_error_exit at /usr/local/src/conda/python-3.14.0/Python/pylifecycle.c:3250 [inlined] fatal_error at /usr/local/src/conda/python-3.14.0/Python/pylifecycle.c:3396 _Py_FatalErrorFunc at /usr/local/src/conda/python-3.14.0/Python/pylifecycle.c:3482 _Py_CheckRecursiveCall at /usr/local/src/conda/python-3.14.0/Python/ceval.c:491 _Py_EnterRecursiveCallTstate at /usr/local/src/conda/python-3.14.0/Include/internal/pycore_ceval.h:216 [inlined] method_enter_call at /usr/local/src/conda/python-3.14.0/Objects/descrobject.c:300 [inlined] method_vectorcall_NOARGS at /usr/local/src/conda/python-3.14.0/Objects/descrobject.c:444 _PyObject_VectorcallTstate at /usr/local/src/conda/python-3.14.0/Include/internal/pycore_call.h:169 [inlined] PyObject_VectorcallMethod at /usr/local/src/conda/python-3.14.0/Objects/call.c:856 PyObject_CallMethodNoArgs at /usr/local/src/conda/python-3.14.0/Include/cpython/abstract.h:65 [inlined] _PyFile_Flush at /usr/local/src/conda/python-3.14.0/Objects/fileobject.c:542 flush_std_files at /usr/local/src/conda/python-3.14.0/Python/pylifecycle.c:1915 fatal_error at /usr/local/src/conda/python-3.14.0/Python/pylifecycle.c:3459 _Py_FatalErrorFunc at /usr/local/src/conda/python-3.14.0/Python/pylifecycle.c:3482 _Py_CheckRecursiveCall at /usr/local/src/conda/python-3.14.0/Python/ceval.c:491 _Py_EnterRecursiveCallTstate at /usr/local/src/conda/python-3.14.0/Include/internal/pycore_ceval.h:216 [inlined] cfunction_enter_call at /usr/local/src/conda/python-3.14.0/Objects/methodobject.c:428 [inlined] cfunction_vectorcall_NOARGS at /usr/local/src/conda/python-3.14.0/Objects/methodobject.c:504 _PyObject_VectorcallTstate at /usr/local/src/conda/python-3.14.0/Include/internal/pycore_call.h:169 _PyObject_CallNoArgs at /usr/local/src/conda/python-3.14.0/Include/internal/pycore_call.h:185 [inlined] _dir_object at /usr/local/src/conda/python-3.14.0/Objects/object.c:2029 [inlined] PyObject_Dir at /usr/local/src/conda/python-3.14.0/Objects/object.c:2052 PyObject_Dir at /home/me/.julia/packages/PythonCall/Ds20G/src/C/pointers.jl:300 [inlined] macro expansion at /home/me/.julia/packages/PythonCall/Ds20G/src/Core/Py.jl:118 [inlined] pydir at /home/me/.julia/packages/PythonCall/Ds20G/src/Core/builtins.jl:191 #4 at /home/me/.julia/packages/PythonCall/Ds20G/src/Core/Py.jl:297 unknown function (ip: 0x7fb386b10b6f) at (unknown file) jl_apply at /cache/build/tester-amdci4-14/julialang/julia-release-1-dot-12/src/julia.h:2391 [inlined] jl_f_invokelatest at /cache/build/tester-amdci4-14/julialang/julia-release-1-dot-12/src/builtins.c:881 #setup_onfixedthread##1 at /home/me/.julia/packages/PythonCall/Ds20G/src/C/context.jl:44 unknown function (ip: 0x7fb39c95b14f) at (unknown file) jl_apply at /cache/build/tester-amdci4-14/julialang/julia-release-1-dot-12/src/julia.h:2391 [inlined] start_task at /cache/build/tester-amdci4-14/julialang/julia-release-1-dot-12/src/task.c:1249 Allocations: 31376985 (Pool: 31372074; Big: 4911); GC: 19 Aborted
However, if I copy and paste the example from here in one step, it runs without any errors.
Ah yes what you're seeing is a known issue with Python 3.14. If you use Python 3.13 (e.g. you can do
CondaPkg.add("python", version="<3.14")) that error goes away. I need to make a release that excludes Python 3.14 automatically for now.Reacted by andreeco and Wen Wei TsengThanks for your fast reply!
I believe this is resolved.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Affects: PythonCall
Describe the bug
I'm running Julia 1.12.1 on macOS 26.1 and it will completely crash whenever I try to use tab completion on any loaded python library through PythonCall. I have Anaconda installed and tried both python 3.12 and 3.13 with the same result. I know it happens on both macOS 15.7 as well as macOS 26.1.
Your system
Additional context
I posted this issue to Julia's GitHub and it was suggested that this is a PythonCall bug.