Has anyone tried using JuliaCall with Streamlit?
JuliaCall works on the first iteration of Streamlit, but on the second run (reloading/button click etc) it hangs when referencing a passed variable. It stays hanging so there is no error message or further information.
The error can be reproduced with the code below. I’m using streamlit==1.30.0 and juliacall==0.9.15
##############################
app.py
##############################
import os
import streamlit as st
from juliacall import Main as jl
current_directory = os.path.dirname(os.path.abspath(file))
julia_module_path = os.path.join(current_directory, “test_bug_module.jl”)
jl.include(julia_module_path)
jl.test_bug_module.test_bug_function(1)
st.subheader(“StreamLit App”)
##############################
test_bug_module.jl
##############################
module test_bug_module
function test_bug_function(input_variable)
println(“This prints”)
x = input_variable * 2
println(“This doesn’t print on the second iteration of the app”)
end
end
##############################