SIGSEGV 11 when interactively loading own Julia module
See original GitHub issueI am trying to get a first simple example running with JuliaPy, loading a minimal Julia module into Python. Here is the Julia module:
module TestMod
export fn
function fn(x)
x ^ 2
end
end
It is loaded and used by the following Python code.
from julia import Main
Main.include("/path/to/file.jl")
Main.TestMod.fn(3)
This works when calling non-interactively (i.e. if the first two lines of the above Python code are called together). However, if interactively I first excute the Python import statement and then afterwards the Main.include statement, I get the following.
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
I also get that crash when I try to otherwise access Main.TestMod.fn
, e.g., by calling
fn = Main.TestMod.fn
Is this expected behaviour? I.e., is it not possible to load custom modules from given files one after the other?
Thank you!
PS: I tried this on a Mac (10.12.6) with Julia 1.1.1, the Python module julia-0.4.1 and the following Python version (running in PyCharm). ‘2.7.16 |Anaconda, Inc.| (default, Mar 14 2019, 16:24:02) \n[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]’
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
I am experiencing the same issue and believe it’s a Pycharm issue since the statement
from julia import Main
works with Ipython session under Spyder, VSCode. Also works with jupyterlab. I’m considering submitting a ticket to JetBrains. FWIW, my setup below
MacOS 10.15.3 PyCharm 2019.3.3 (Community Edition) PYTHON version 3.8.0 Julia Version 1.3.1 (2019-12-30) IPython 7.9.0 PyJulia version 0.5.1
The same error on the Pycharm platform, not only from Julia import main, I have this error in all julia package import