question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SIGSEGV 11 when interactively loading own Julia module

See original GitHub issue

I 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:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
lg-montoyacommented, Feb 11, 2020

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

1reaction
liyingwang95commented, Sep 8, 2020

The same error on the Pycharm platform, not only from Julia import main, I have this error in all julia package import

Read more comments on GitHub >

github_iconTop Results From Across the Web

Segmentation fault when updating packages - Julia Discourse
This may be a consequence of the fact that modules are no longer loaded into Main by default. StringDistances seems to be a...
Read more >
Error occurred when loading a custom Julia module
You have a typo in module name perhaps you are loading a different module than you think? Once corrected your code works. Share....
Read more >
Software List - Ohio Supercomputer Center
To select a particular software version, use module load abaqus/version . ... For-profit OSC users must obtain their own Amber license.
Read more >
Porting Julia to PowerPC - Google Groups
On Mar 26, 2015 11:56 PM, "Geert Janssen" <gee...@gmail.com> wrote: > > I really like to start a discussion on porting Julia to...
Read more >
Kodiak User's Guide - Baylor University
The login node is where you do your interactive work such as editing files, compiling your ... module load use.own $ cd ~/privatemodules...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found