Update, this is also the same using PyJulia. As soon as I import the module in the global scope and try call it within a function it instantly segfaults.
#!/usr/bin/env python3
from juliacall import Main as jl
jl.seval("using myModule")
def test_julia_import():
print(jl.myModule.molMassDict)
test_julia_import()
Interestingly this MWE works no problem. The problem arises when I try to do this inside a Django (I’m not sure if you’re familiar with Django but it’s a Web Dev framework) view. A Django view is similarly a Python function, for example:
def django_view(request):
test_julia()
if I call test_julia() within this, it instantly segfaults:
signal (11): Segmentation fault
in expression starting at none:0
Allocations: 6828442 (Pool: 6825828; Big: 2614); GC: 8